Questions tagged [pyqtgraph]

High-performance scientific graphics for PyQt.

PyQtGraph is a pure-python graphics and GUI library built on PyQt4 / PySide and numpy. It is intended for use in mathematics / scientific / engineering applications. Despite being written entirely in python, the library is very fast due to its heavy leverage of numpy for number crunching and Qt's GraphicsView framework for fast display. PyQtGraph is distributed under the MIT open-source license.

987 questions
4
votes
1 answer

pyqtgraph limit zoom to upper/lower bound of axes

so Pyqtgraph automatically computes the axis and rescales upon zooming, and this is fine. However I have two axes, frequency and hour. Frequency can take any value between 0-100 and hour can take any value between 0-39. How can I limit the axis to…
James Elder
  • 1,583
  • 3
  • 22
  • 34
3
votes
1 answer

Error while drawing item

I am running into an error with pyqtgraph. I am trying to plot a 3D scatterplot with OpenGL. However, when I run my code, I get a blank plot and this output: |==============================>> | Traceback (most recent call last): | File…
3
votes
1 answer

Adding pyqtgraph to PyQt6

So I am making a GUI using Pyqt6 and want to add graphs inside the Gui with other data, SO when I try adding the graph i get the error bellow: call: addWidget(self, QWidget): argument 1 has unexpected type 'PlotWidget' addWidget(self, QWidget,…
Ahmed
  • 89
  • 7
3
votes
1 answer

No Module Name 'pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5' while executing exe

ModuleNotFoundError: No module named 'pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5' [13260] Failed to execute script main provided by this error when executing an exe created using pyinstaller, i have tried using --hidden-import but it…
codeos_dev
  • 41
  • 1
3
votes
0 answers

Is there any way to change quality of image exported from pyqtgraph?

I have a simple question. How to improve the quality of the exported image from pyqtgraph, using the export API ? When I used the GUI export tool, the exported image looks like this in my GUI. If I'm not using the GUI but instead using code to…
pavelk
  • 31
  • 2
3
votes
3 answers

How to update a plot in pyqtgraph?

I am trying to have a user interface using PyQt5 and pyqtgraph. I made two checkboxes and whenever I select them I want to plot one of the two data sets available in the code and whenever I deselect a button I want it to clear the corresponding…
MOON
  • 2,516
  • 4
  • 31
  • 49
3
votes
1 answer

Pyqtgraph - how add axis Datetime?

The example uses the file 'QtChart.ui' (this is important) the widget for Pyqtgraph is embedded in it (this is also important). PROBLEM: The graph is displayed, but the seconds since the beginning of the epoch are displayed instead of the date-time…
paradoxarium
  • 177
  • 1
  • 12
3
votes
0 answers

Pyqtgraph - Get data coordinates of mouse click on a curve

I'm trying to add some functionality to a PyQtGraph-based app. I'd like to click on a curve (trace) and add a data label with the x- and y-values of the nearest data point. Minimal code sample (Python 3.x, PyQt5): import sys import pyqtgraph as…
3
votes
1 answer

PyQtGraph: Issue looping through plotting slices of data

I have a python class that generates a numpy array of size 10000 and performs some calculation on it. The class has two plot methods and both use pyqtgraph Plotting the entire data Plotting segments of data one at a time (200 samples) I was…
afp_2008
  • 1,940
  • 1
  • 19
  • 46
3
votes
1 answer

Embeding PyQtGraph in Qt-Designer using PySide2

I can't get PyQtGraph to work using PySide2 and a .ui file where I promoted a QWidget to a PlotWidget in Qt-Designer. It works fine when I use PyQt5, but using PySide2, I get the following message : Qt WebEngine seems to be initialized from a…
L. Arnaud
  • 55
  • 6
3
votes
1 answer

Remove / Delete Legend in PyQtGraph

Two lines are created on the live chart and a legend is added. At the next update, the lines on the chart are deleted using self.pw.clear(). But the legend is not deleted, and with each update, a new instance of the legend is added, there are a lot…
paradoxarium
  • 177
  • 1
  • 12
3
votes
1 answer

PyQtGraph doesn't resize

I'm trying to make simplest Qt app to visualize some data using pyqtgraph lib. I've created one-window app using Qt Designer, placed there Graphics View widget, promoted it to pygtgraph. In my app (written in python) I create test data set and plot…
Ostap
  • 119
  • 2
  • 9
3
votes
1 answer

Color is not working in pyqtgraph like the way it works in matplotlib

I have a 2d numpy array as following import numpy as np agents = np.array([[ 1. , -71.8, 41.2], [ 1. , -71.8, 41.3], [ 0. , -71.8, 41.4], [ 0. , -71.7, 41.4], [ 0. , -71.6, 41.4]]) Now I want to visualize it.…
Kartikeya Sharma
  • 1,335
  • 1
  • 10
  • 22
3
votes
0 answers

Insert GLViewWidget in GraphicsWindow at a specific place

I have currently build a GUI which shows a list and a image concurrently I would also like to show the point-cloud of the current surrounding at the same time and to be able to access everything in the GUI. I have tried the VTK visualization tool,…
Synaps
  • 323
  • 5
  • 14
3
votes
1 answer

How do I integrate the pyqtgraph image example into a class?

I am trying to integrate the pyqtgraph example into a class. However, since the example uses "global" to acces important methods, I am having trouble translating it into a class. The example: import initExample ## Add path to library (just for…