I would like to know how I can set the x and y axis limits that are displayed for a pyqtgraph.GraphicsWindow.addPlot object. I need to display a lot of data inside a loop (hence
Michael.
The easiest way would be to simply specify your ranges as elements of a list. Replace the p1.setXRange
with something like this:
p1.setRange(xRange=[5,20])
And that's it!
Check the documentation of this class in: http://www.pyqtgraph.org/documentation/graphicsItems/viewbox.html#pyqtgraph.ViewBox.setRange