Python pyqtgraph.GraphicsView() Examples
The following are 17
code examples of pyqtgraph.GraphicsView().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pyqtgraph
, or try the search function
.
Example #1
Source File: waveformhistviewer.py From tridesclous with MIT License | 6 votes |
def __init__(self, controller=None, parent=None): WidgetBase.__init__(self, parent=parent, controller=controller) self.layout = QT.QVBoxLayout() self.setLayout(self.layout) h = QT.QHBoxLayout() self.layout.addLayout(h) but = QT.QPushButton('Show 1D dist', checkable=True) h.addWidget(but) but.clicked.connect(self.show_hide_1d_dist) self.graphicsview = pg.GraphicsView() self.layout.addWidget(self.graphicsview) self.graphicsview2 = pg.GraphicsView() self.layout.addWidget(self.graphicsview2) self.graphicsview2.hide() self.create_settings() self.initialize_plot() self.similarity = None self.on_params_changed()#this do refresh
Example #2
Source File: VideoTemplate_pyqt5.py From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 | 6 votes |
def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.downsampleCheck.setText(_translate("MainWindow", "Auto downsample")) self.scaleCheck.setText(_translate("MainWindow", "Scale Data")) self.rawRadio.setText(_translate("MainWindow", "RawImageWidget")) self.gfxRadio.setText(_translate("MainWindow", "GraphicsView + ImageItem")) self.rawGLRadio.setText(_translate("MainWindow", "RawGLImageWidget")) self.dtypeCombo.setItemText(0, _translate("MainWindow", "uint8")) self.dtypeCombo.setItemText(1, _translate("MainWindow", "uint16")) self.dtypeCombo.setItemText(2, _translate("MainWindow", "float")) self.label.setText(_translate("MainWindow", "Data type")) self.rgbLevelsCheck.setText(_translate("MainWindow", "RGB")) self.label_3.setText(_translate("MainWindow", "<--->")) self.label_2.setText(_translate("MainWindow", "<--->")) self.label_4.setText(_translate("MainWindow", "<--->")) self.lutCheck.setText(_translate("MainWindow", "Use Lookup Table")) self.alphaCheck.setText(_translate("MainWindow", "alpha")) self.fpsLabel.setText(_translate("MainWindow", "FPS")) self.rgbCheck.setText(_translate("MainWindow", "RGB")) self.label_5.setText(_translate("MainWindow", "Image size"))
Example #3
Source File: VideoTemplate_pyqt.py From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 | 6 votes |
def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) self.downsampleCheck.setText(_translate("MainWindow", "Auto downsample", None)) self.scaleCheck.setText(_translate("MainWindow", "Scale Data", None)) self.rawRadio.setText(_translate("MainWindow", "RawImageWidget", None)) self.gfxRadio.setText(_translate("MainWindow", "GraphicsView + ImageItem", None)) self.rawGLRadio.setText(_translate("MainWindow", "RawGLImageWidget", None)) self.dtypeCombo.setItemText(0, _translate("MainWindow", "uint8", None)) self.dtypeCombo.setItemText(1, _translate("MainWindow", "uint16", None)) self.dtypeCombo.setItemText(2, _translate("MainWindow", "float", None)) self.label.setText(_translate("MainWindow", "Data type", None)) self.rgbLevelsCheck.setText(_translate("MainWindow", "RGB", None)) self.label_3.setText(_translate("MainWindow", "<--->", None)) self.label_2.setText(_translate("MainWindow", "<--->", None)) self.label_4.setText(_translate("MainWindow", "<--->", None)) self.lutCheck.setText(_translate("MainWindow", "Use Lookup Table", None)) self.alphaCheck.setText(_translate("MainWindow", "alpha", None)) self.fpsLabel.setText(_translate("MainWindow", "FPS", None)) self.rgbCheck.setText(_translate("MainWindow", "RGB", None)) self.label_5.setText(_translate("MainWindow", "Image size", None))
Example #4
Source File: VideoTemplate_pyside.py From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 | 6 votes |
def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) self.downsampleCheck.setText(QtGui.QApplication.translate("MainWindow", "Auto downsample", None, QtGui.QApplication.UnicodeUTF8)) self.scaleCheck.setText(QtGui.QApplication.translate("MainWindow", "Scale Data", None, QtGui.QApplication.UnicodeUTF8)) self.rawRadio.setText(QtGui.QApplication.translate("MainWindow", "RawImageWidget", None, QtGui.QApplication.UnicodeUTF8)) self.gfxRadio.setText(QtGui.QApplication.translate("MainWindow", "GraphicsView + ImageItem", None, QtGui.QApplication.UnicodeUTF8)) self.rawGLRadio.setText(QtGui.QApplication.translate("MainWindow", "RawGLImageWidget", None, QtGui.QApplication.UnicodeUTF8)) self.dtypeCombo.setItemText(0, QtGui.QApplication.translate("MainWindow", "uint8", None, QtGui.QApplication.UnicodeUTF8)) self.dtypeCombo.setItemText(1, QtGui.QApplication.translate("MainWindow", "uint16", None, QtGui.QApplication.UnicodeUTF8)) self.dtypeCombo.setItemText(2, QtGui.QApplication.translate("MainWindow", "float", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate("MainWindow", "Data type", None, QtGui.QApplication.UnicodeUTF8)) self.rgbLevelsCheck.setText(QtGui.QApplication.translate("MainWindow", "RGB", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8)) self.lutCheck.setText(QtGui.QApplication.translate("MainWindow", "Use Lookup Table", None, QtGui.QApplication.UnicodeUTF8)) self.alphaCheck.setText(QtGui.QApplication.translate("MainWindow", "alpha", None, QtGui.QApplication.UnicodeUTF8)) self.fpsLabel.setText(QtGui.QApplication.translate("MainWindow", "FPS", None, QtGui.QApplication.UnicodeUTF8)) self.rgbCheck.setText(QtGui.QApplication.translate("MainWindow", "RGB", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("MainWindow", "Image size", None, QtGui.QApplication.UnicodeUTF8))
Example #5
Source File: gui.py From webcam-pix2pix-tensorflow with MIT License | 6 votes |
def init_window(x=0, y=0, w=1440, h=1080, title='Hello World'): global _window_view, _window_layout, _window_imgs, _window_stats_label, _windows view = pg.GraphicsView() layout = pg.GraphicsLayout(border=(100,100,100)) view.setCentralItem(layout) view.setWindowTitle(title) view.setGeometry(x, y, w, h) view.show() imgs = [] imgs.append( _add_image_to_layout(layout, title='capture') ) imgs.append( _add_image_to_layout(layout, title='processed') ) imgs.append( _add_image_to_layout(layout, title='prediction') ) layout.nextRow() stats_label = pg.LabelItem() layout.addItem(stats_label, colspan=3) _window_view = view _window_layout = layout _window_imgs = imgs _window_stats_label = stats_label _windows.append(view)
Example #6
Source File: batchviewer.py From BatchViewer with Apache License 2.0 | 6 votes |
def init(self, width, height): self.rect = QtCore.QRect(0, 0, width, height) self.imageItem = pg.ImageItem() self.imageItem.setImage(None) self.graphicsScene = pg.GraphicsScene() self.graphicsScene.addItem(self.imageItem) self.graphicsView = pg.GraphicsView() self.graphicsView.setRenderHint(QtGui.QPainter.Antialiasing) self.graphicsView.setScene(self.graphicsScene) layout = QtGui.QHBoxLayout() layout.addWidget(self.graphicsView) self.setLayout(layout) self.setMaximumSize(width, height) self.setMinimumSize(width-10, height-10)
Example #7
Source File: silhouette.py From tridesclous with MIT License | 6 votes |
def __init__(self, controller=None, parent=None): WidgetBase.__init__(self, parent=parent, controller=controller) self.layout = QT.QVBoxLayout() self.setLayout(self.layout) h = QT.QHBoxLayout() self.layout.addLayout(h) h.addWidget(QT.QLabel('<b>Silhouette</b>') ) but = QT.QPushButton('settings') but.clicked.connect(self.open_settings) h.addWidget(but) self.graphicsview = pg.GraphicsView() self.layout.addWidget(self.graphicsview) self.alpha = 60 self.initialize_plot() self.refresh()
Example #8
Source File: similarity.py From tridesclous with MIT License | 6 votes |
def __init__(self, controller=None, parent=None): WidgetBase.__init__(self, parent=parent, controller=controller) self.layout = QT.QVBoxLayout() self.setLayout(self.layout) #~ h = QT.QHBoxLayout() #~ self.layout.addLayout(h) #~ h.addWidget(QT.QLabel('<b>Similarity</b>') ) #~ but = QT.QPushButton('settings') #~ but.clicked.connect(self.open_settings) #~ h.addWidget(but) self.graphicsview = pg.GraphicsView() self.layout.addWidget(self.graphicsview) self.initialize_plot() self.on_params_changed()#this do refresh
Example #9
Source File: waveformviewer.py From tridesclous with MIT License | 6 votes |
def __init__(self, controller=None, parent=None): WidgetBase.__init__(self, parent=parent, controller=controller) self.layout = QT.QVBoxLayout() self.setLayout(self.layout) #~ self.create_settings() self.create_toolbar() self.layout.addWidget(self.toolbar) self.graphicsview = pg.GraphicsView() self.layout.addWidget(self.graphicsview) self.initialize_plot() self.alpha = 60 self.refresh()
Example #10
Source File: VideoTemplate_pyside.py From tf-pose with Apache License 2.0 | 6 votes |
def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) self.downsampleCheck.setText(QtGui.QApplication.translate("MainWindow", "Auto downsample", None, QtGui.QApplication.UnicodeUTF8)) self.scaleCheck.setText(QtGui.QApplication.translate("MainWindow", "Scale Data", None, QtGui.QApplication.UnicodeUTF8)) self.rawRadio.setText(QtGui.QApplication.translate("MainWindow", "RawImageWidget", None, QtGui.QApplication.UnicodeUTF8)) self.gfxRadio.setText(QtGui.QApplication.translate("MainWindow", "GraphicsView + ImageItem", None, QtGui.QApplication.UnicodeUTF8)) self.rawGLRadio.setText(QtGui.QApplication.translate("MainWindow", "RawGLImageWidget", None, QtGui.QApplication.UnicodeUTF8)) self.dtypeCombo.setItemText(0, QtGui.QApplication.translate("MainWindow", "uint8", None, QtGui.QApplication.UnicodeUTF8)) self.dtypeCombo.setItemText(1, QtGui.QApplication.translate("MainWindow", "uint16", None, QtGui.QApplication.UnicodeUTF8)) self.dtypeCombo.setItemText(2, QtGui.QApplication.translate("MainWindow", "float", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate("MainWindow", "Data type", None, QtGui.QApplication.UnicodeUTF8)) self.rgbLevelsCheck.setText(QtGui.QApplication.translate("MainWindow", "RGB", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8)) self.lutCheck.setText(QtGui.QApplication.translate("MainWindow", "Use Lookup Table", None, QtGui.QApplication.UnicodeUTF8)) self.alphaCheck.setText(QtGui.QApplication.translate("MainWindow", "alpha", None, QtGui.QApplication.UnicodeUTF8)) self.fpsLabel.setText(QtGui.QApplication.translate("MainWindow", "FPS", None, QtGui.QApplication.UnicodeUTF8)) self.rgbCheck.setText(QtGui.QApplication.translate("MainWindow", "RGB", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("MainWindow", "Image size", None, QtGui.QApplication.UnicodeUTF8))
Example #11
Source File: isiviewer.py From tridesclous with MIT License | 6 votes |
def __init__(self, controller=None, parent=None): WidgetBase.__init__(self, parent=parent, controller=controller) self.layout = QT.QVBoxLayout() self.setLayout(self.layout) #~ h = QT.QHBoxLayout() #~ self.layout.addLayout(h) #~ h.addWidget(QT.QLabel('<b>Similarity</b>') ) #~ but = QT.QPushButton('settings') #~ but.clicked.connect(self.open_settings) #~ h.addWidget(but) self.graphicsview = pg.GraphicsView() self.layout.addWidget(self.graphicsview) self.initialize_plot() #~ self.on_params_changed()#this do refresh
Example #12
Source File: featuretimeviewer.py From tridesclous with MIT License | 6 votes |
def __init__(self, controller=None, parent=None): WidgetBase.__init__(self, parent=parent, controller=controller) self.layout = QT.QVBoxLayout() self.setLayout(self.layout) self.combo_seg = QT.QComboBox() self.layout.addWidget(self.combo_seg) self.combo_seg.addItems([ 'Segment {}'.format(seg_num) for seg_num in range(self.controller.dataio.nb_segment) ]) self._seg_pos = 0 self.seg_num = self._seg_pos self.combo_seg.currentIndexChanged.connect(self.refresh) self.graphicsview = pg.GraphicsView() self.layout.addWidget(self.graphicsview) self.create_settings() self.initialize_plot() self.similarity = None self.on_params_changed()#this do refresh
Example #13
Source File: VideoTemplate_pyqt5.py From tf-pose with Apache License 2.0 | 6 votes |
def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.downsampleCheck.setText(_translate("MainWindow", "Auto downsample")) self.scaleCheck.setText(_translate("MainWindow", "Scale Data")) self.rawRadio.setText(_translate("MainWindow", "RawImageWidget")) self.gfxRadio.setText(_translate("MainWindow", "GraphicsView + ImageItem")) self.rawGLRadio.setText(_translate("MainWindow", "RawGLImageWidget")) self.dtypeCombo.setItemText(0, _translate("MainWindow", "uint8")) self.dtypeCombo.setItemText(1, _translate("MainWindow", "uint16")) self.dtypeCombo.setItemText(2, _translate("MainWindow", "float")) self.label.setText(_translate("MainWindow", "Data type")) self.rgbLevelsCheck.setText(_translate("MainWindow", "RGB")) self.label_3.setText(_translate("MainWindow", "<--->")) self.label_2.setText(_translate("MainWindow", "<--->")) self.label_4.setText(_translate("MainWindow", "<--->")) self.lutCheck.setText(_translate("MainWindow", "Use Lookup Table")) self.alphaCheck.setText(_translate("MainWindow", "alpha")) self.fpsLabel.setText(_translate("MainWindow", "FPS")) self.rgbCheck.setText(_translate("MainWindow", "RGB")) self.label_5.setText(_translate("MainWindow", "Image size"))
Example #14
Source File: VideoTemplate_pyqt.py From tf-pose with Apache License 2.0 | 6 votes |
def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) self.downsampleCheck.setText(_translate("MainWindow", "Auto downsample", None)) self.scaleCheck.setText(_translate("MainWindow", "Scale Data", None)) self.rawRadio.setText(_translate("MainWindow", "RawImageWidget", None)) self.gfxRadio.setText(_translate("MainWindow", "GraphicsView + ImageItem", None)) self.rawGLRadio.setText(_translate("MainWindow", "RawGLImageWidget", None)) self.dtypeCombo.setItemText(0, _translate("MainWindow", "uint8", None)) self.dtypeCombo.setItemText(1, _translate("MainWindow", "uint16", None)) self.dtypeCombo.setItemText(2, _translate("MainWindow", "float", None)) self.label.setText(_translate("MainWindow", "Data type", None)) self.rgbLevelsCheck.setText(_translate("MainWindow", "RGB", None)) self.label_3.setText(_translate("MainWindow", "<--->", None)) self.label_2.setText(_translate("MainWindow", "<--->", None)) self.label_4.setText(_translate("MainWindow", "<--->", None)) self.lutCheck.setText(_translate("MainWindow", "Use Lookup Table", None)) self.alphaCheck.setText(_translate("MainWindow", "alpha", None)) self.fpsLabel.setText(_translate("MainWindow", "FPS", None)) self.rgbCheck.setText(_translate("MainWindow", "RGB", None)) self.label_5.setText(_translate("MainWindow", "Image size", None))
Example #15
Source File: probegeometryview.py From tridesclous with MIT License | 5 votes |
def __init__(self, parent = None, channel_groups=None): QT.QWidget.__init__(self, parent) self.channel_groups = channel_groups self.layout = QT.QVBoxLayout() self.setLayout(self.layout) h = QT.QHBoxLayout() self.layout.addLayout(h) self.combo_chan_grp = QT.QComboBox() h.addWidget(self.combo_chan_grp) self.combo_chan_grp.clear() self.combo_chan_grp.addItems([str(k) for k in self.channel_groups.keys()]) self.combo_chan_grp.currentIndexChanged .connect(self.on_chan_grp_change) self.checkbox = QT.QCheckBox('flip_bottom_up') h.addWidget(self.checkbox) self.checkbox.stateChanged.connect(self.refresh) #~ self.combo_chan_grp.blockSignals(True) #~ self.combo_chan_grp.blockSignals(False) #~ self.on_chan_grp_change() self.graphicsview = pg.GraphicsView() self.layout.addWidget(self.graphicsview) self.viewBox = MyViewBox() self.viewBox.disableAutoRange() self.plot = pg.PlotItem(viewBox=self.viewBox) self.graphicsview.setCentralItem(self.plot) self.plot.hideButtons() self.plot.showAxis('left', False) self.refresh()
Example #16
Source File: traceviewer.py From tridesclous with MIT License | 5 votes |
def __init__(self,controller=None, signal_type='initial', parent=None): WidgetBase.__init__(self, parent=parent, controller=controller) self.dataio = controller.dataio self.signal_type = signal_type self.layout = QT.QVBoxLayout() self.setLayout(self.layout) self.create_toolbar() # create graphic view and 2 scroll bar g = QT.QGridLayout() self.layout.addLayout(g) self.scroll_chan = QT.QScrollBar() g.addWidget(self.scroll_chan, 0,0) self.scroll_chan.valueChanged.connect(self.on_scroll_chan) self.graphicsview = pg.GraphicsView() g.addWidget(self.graphicsview, 0,1) self.initialize_plot() self.scroll_time = QT.QScrollBar(orientation=QT.Qt.Horizontal) g.addWidget(self.scroll_time, 1,1) self.scroll_time.valueChanged.connect(self.on_scroll_time) #handle time by segments self.time_by_seg = np.array([0.]*self.dataio.nb_segment, dtype='float64') self.change_segment(0) self.refresh()
Example #17
Source File: onlinewaveformhistviewer.py From tridesclous with MIT License | 5 votes |
def __init__(self, **kargs): WidgetNode.__init__(self, **kargs) self.layout = QT.QVBoxLayout() self.setLayout(self.layout) h = QT.QHBoxLayout() self.layout.addLayout(h) self.combobox = QT.QComboBox() h.addWidget(self.combobox) but = QT.QPushButton('clear') h.addWidget(but) but.clicked.connect(self.on_clear) self.label = QT.QLabel('') h.addWidget(self.label) self.graphicsview = pg.GraphicsView() self.layout.addWidget(self.graphicsview) self.params = pg.parametertree.Parameter.create( name='settings', type='group', children=self._params) self.tree_params = pg.parametertree.ParameterTree(parent=self) self.tree_params.header().hide() self.tree_params.setParameters(self.params, showTop=True) self.tree_params.setWindowTitle('Options for waveforms hist viewer') self.tree_params.setWindowFlags(QT.Qt.Window) self.params.sigTreeStateChanged.connect(self.on_params_changed) self.initialize_plot() self.mutex = Mutex()