pyqtgraph

Maximum intensity projection in pyqtgraph using GLVolumeItem

Maximum intensity projection in pyqtgraph using GLVolumeItem Question: I would like to use the maximum intensity projection (MIP) to view some 3D medical images in pyqtgraph using GLVolumeItem. I see that there are three pre-defined GLOptions settings. The translucent and additive mode both look like MIP. So my questions are Is it the real MIP …

Total answers: 2

Exporting pyqtgraph to video

Exporting pyqtgraph to video Question: I want to export a pyqtgraph to a video. Is there any easy way to do this? The plot is not much different from this example except it contains about 10000 frames: from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg app = QtGui.QApplication([]) win = …

Total answers: 1

Inverting the Y axis in PyQtGraph

Inverting the Y axis in PyQtGraph Question: I am developing an app with Python and PyQt4 that plots different parameters against depth. The plotting package is PyQtGraph because of its good animation speed features. Since I am plotting against depth, then I want to invert the Y axis. I have found that I can modify …

Total answers: 1

pyqtgraph widget.addLine change color/width

pyqtgraph widget.addLine change color/width Question: I want to use the widget function addLine. In my case it is as following: widget.addLine(x=None, y=0.8) #endless horizontal line Now i want to change the color and width of this line, but i cannot find a fitting function. Is there something available to do this? Additional, is there a …

Total answers: 2

Segmentation fault when exiting PyQT app

Segmentation fault when exiting PyQT app Question: First, I have tried my best to find a solution to this problem here and other places and I am have a general idea of what the problem is, but it is not clear to me how to solve it. The basic problem is that I am getting …

Total answers: 2

How do I clear a ScatterPlotItem in PYQTGRAPH

How do I clear a ScatterPlotItem in PYQTGRAPH Question: I am attempting to move a “cursor” around my graph using ScatterPlotItem and a ‘+’ symbol as the cursor. The cursor updates its position perfectly but I cannot figure out how to clear the last instance. Here is the line that I use to plot the …

Total answers: 2

Show string values on x-axis in pyqtgraph

Show string values on x-axis in pyqtgraph Question: I want to display string values for ticks on x-axis in pyqtgraph. Right now I am unable to figure out how to do that. Ex: x = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’] y = [1, 2, 3, 4, ,5, 6] pg.plot(x, y) When I try to …

Total answers: 4

PyQt mousePressEvent – get object that was clicked on?

PyQt mousePressEvent – get object that was clicked on? Question: I’m using PyQt and PyQtGraph to build a relatively simple plotting UI. As part of this I have a graphicsview (pyqtgraph’s graphicslayoutwidget) that has PlotItems dynamically added to it by the user. What I’m trying to achieve is allowing the user to select a PlotItem …

Total answers: 3

Margins in PyQtGraph's GraphicsLayout

Margins in PyQtGraph's GraphicsLayout Question: Having a simple graphics layout with PyQtGraph: from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg app = QtGui.QApplication([]) view = pg.GraphicsView() l = pg.GraphicsLayout(border=’g’) view.setCentralItem(l) view.show() view.resize(800,600) l.addPlot(0, 0) l.addPlot(1, 0) l.layout.setSpacing(0.) l.setContentsMargins(0., 0., 0., 0.) if __name__ == ‘__main__’: import sys if (sys.flags.interactive != 1) or not hasattr(QtCore, …

Total answers: 4