Questions tagged [pyqtgraph]
High-performance scientific graphics for PyQt.
883
questions
-1
votes
0
answers
19
views
QSlider in GraphicsLayoutWidget
Is it possible to add a QSlider and other widgets into GraphicsLayoutWidget?
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.layout = QVBoxLayout()
...
0
votes
0
answers
5
views
Is there a possibility to select a particular image in a 3D pyqtgraph.ImageView()?
I have a numpy ndarray (2800, 100, 100) which represents a video of 2800 pictures with 100x100 pixel each. In order to see it in PyQt I made an ImageView Widget out of it:
imv = pg.ImageView()
imv....
-1
votes
0
answers
23
views
PyQt5: Update Image py emitting pyqtSignal doesn't work
I created a GUI. In the class which is inheriting from QWidget i designed the gui and defined the functions for my buttons. In the class Worker() i am editing values in a while loop and i want to ...
0
votes
0
answers
29
views
convert matplotlib figure to 2-D Array to show in pyqtgraph.ImageItem
i find an example in this Link which show 2-D array in pyqtgraph.ImageItem.
import matplotlib.pyplot as plt
import numpy as np
import pyqtgraph as pg
def main():
imarray = np.random.rand(100, 100)...
0
votes
0
answers
38
views
pyqtgraph resize plotItem viewBox to show all other viewBoxes
So i have a plotWidget where i added multiple view-boxes that show different signals.
Based on the multiplePlotAxes.py example i have created this example:
import pyqtgraph as pg
from pyqtgraph.Qt ...
0
votes
0
answers
7
views
Fix for pyqtgraph bug when ignoring dpi display setting and using 96 dpi
I have the same issue as described in link below, where the axes of my plot aren't rendered correctly if I set the Qt.AA_Use96Dpi attribute of my QApplication to make my application invariant across ...
0
votes
2
answers
54
views
Drawing an arc using pyqtgraph
I need to draw some shapes on the screen using pyqtgraph.
I chose pyqtgraph over matplotlib because the former is way faster when a lot of shapes are present.
For lines polygons everything is ok, ...
0
votes
1
answer
24
views
pyqtgrapgh: Image Item not in the center of GraphicsView
I am using pyqtgraph to visualate 2D arrays. Due to the fact that I have to refresh the visualated Image because of a real time application which I want to evaluate I am using GraphicsView(). Then I ...
1
vote
0
answers
18
views
pg.PlotCurveItem() stepmode="center" issue with x and y data shape
i have a problem with the pyqtgraph PlotCurveItem() function.
This is the code. The plot1 is shown in another part of the program.
...
vals = np.random.random(size=100)*0.8
y, x = np.histogram(vals,...
0
votes
1
answer
30
views
Add/Remove numerous plots on a PlotWidget in Pyqtgraph
I have a plotWidget (self.widget0) from pyqtgraph on the pyqt GUI. I want to add 200 plots at this widget. What I can do is add each plot one by one:
self.plot0 = self.widget0.plot(xx0, yy0)
self....
0
votes
1
answer
28
views
PyQtGraph: How to name Bars in BarGraphItem
I need to be able to create a graph in PyQtGraph that either displays strings on the x line like this:
Or inside of the bar itself like this:
These are my values:
y = [5.509, 5.509, 5.414, 5.414, 5....
-2
votes
0
answers
24
views
Printing in Qthread with Pyqt5 does not work, it does not give me the data
enter image description here
enter image description here
The Print doesn't work - why?
0
votes
0
answers
13
views
How to show all the GraphicsLayoutWidget in srcollarea?
In order to embed pyqtgraph's drawing into the UI, GraphicsLayoutWidget is used, and it is put into the QScrollArea, but QScrollArea cann't completely display the entire graph.
here is my code:
'''
...
1
vote
0
answers
7
views
Plot coloured region X axis in PyQtgrpah
I need to plot a graph in PyQt5 with PyQtgraph with custom plot like this in QtChart:
enter image description here
Linkt to the cutom QtChart example: https://doc.qt.io/qt-5/qtcharts-customchart-...
0
votes
1
answer
29
views
ImportError: cannot import name 'registerParameterItemType
I am trying to run the code in the following link "https://github.com/habom2310/Heart-rate-measurement-using-camera"
but I get import error as follows:
Traceback (most recent call last):
...
0
votes
0
answers
15
views
Is there any way to draw great number of rectangles in pyqtgraph?
I made a graphic viewer by using pyqtgraph. The code logic is like this:
Graphic Viewer
pg = GraphicsLayoutWidget()
vb = pg.addViewBox()
vb.addItem(RectItem)
The RectItem is a Class that I copied and ...
0
votes
1
answer
18
views
pyqtgraph is installed but isn't recognized when I import it
I am trying to run this code that visualizes audio waveforms and their fourier transforms
https://github.com/markjay4k/Audio-Spectrum-Analyzer-in-Python/commit/ff9caf4156b7a8c039d8beba987f93566a6aace0
...
0
votes
0
answers
32
views
pyqtgraph cutting off axis numbers at top and right
I'm trying to get padding at the top and right side of a pyqtgraph plot, so that the numbers at the edge of the axes aren't cut off, which is the default behavior when creating a graph.
There was a ...
0
votes
1
answer
28
views
wheelEvent not being called in latest pyqt5 when using a plot with pyqtgraph
I'm using pyqt5 to create some sort of an audio editor for my own needs and I need to be able to handle the mouse wheel and mouse clicks and release on the waveform to zoom in or to set a region that ...
1
vote
0
answers
27
views
adding item/action to pyqtgraph PlotWidget context menu
I'm new to python and pyqt5/pyqtgraph. Trying to add an action/item to the context menu of a PlotWidget using the code below. The New_Item appears overlaid on top of the "View All" item in ...
0
votes
0
answers
47
views
How much faster is PyQtGraph than Matplotlib?
I am trying to implement a GUI on a Raspberry Pi which plots real time data coming in from a TCP client with the functionality of panning and zooming as well. I have heard all the rage about PyQtGraph ...
0
votes
0
answers
98
views
Multiple lines plot using pyqtgraph
For a project, I need to extract all the lines contained in a .dxf file and display them on the screen.
I used matplotlib in the past for this purpose and it works fine.
For every line encountered in ...
1
vote
2
answers
69
views
How to solve the self-crash problem of running multiple pyqt or pyqtgraph drawing components?
I designed the interface, and the custom component tried to output multiple drawing components, and the program crashed after a while.
The program probably consists of the following:ble. Py reads the ...
0
votes
0
answers
12
views
How to invert Y axis of a ScatterPlotItem in PyQtGraph
I want to display points in a scatter plot with indices as if it were a matrix, origin top left inverting the Y axis:
0,0 1,0
0,1 1,1
instead of default where the origin is the lower left.
0,1 1,1
0,...
0
votes
0
answers
22
views
How to fix BarGraphItem height of a plot using PyQtgraph
How to fix BarGraphItem height when zoom in or zoom out pyqtgraph plot, it should be similar with axis font, the font size is in pixel, please someone helps, thank you very much, basic code as below:
...
0
votes
1
answer
39
views
Is there a way to reproduce matplotlib's drawstyle='mid' functionality in pyqtgraph?
I'm trying to reproduce the example of matplotlib found here.
I'm aware of this question but it doesn't cover the case for drawstyle='mid'
I assumed stepMode='center' would do the trick but I can't ...
1
vote
1
answer
92
views
Pyqtgraph's PlotWidget doesn't show correctly
I've been trying to embed a graph into my application using pyqtgraph's PlotWidget. It seemed simple enough while following this tutorial. I have managed to show a graph well enough, the problem is ...
0
votes
0
answers
21
views
Debugging/Finding documentation for new python modules?
I'm using VSCode to program in python and in many projects I find very high dependency on google for my project from other people's work which I find very unprofessional and a bad practice.
So I'd ...
0
votes
0
answers
43
views
pip install pyqtgraph complains about missing pip._internal.vcs.mercurial module
I have been using PyQt6 for a while without a problem. Now I'm trying to do the exercises from a textbook, using pyqtgraph. It does not seem to come bundled with PyQt6 because the import statement ...
-1
votes
1
answer
30
views
Multithread - Reeading from serial, draw with pyqtgraph
I'm trying to receive messages sent with different id's at 921600 baudrate from the serial port, parse these messages according to their id's and plot them in different graphs. Firstly when I plot ...
0
votes
1
answer
260
views
Best way to chart streamed data using PyQtChart or pyqtgraph with PyQt5 on Python?
I am streaming TimeSeries that I want to chart efficiently (20+ chart live on a small computer).
I have tried PyQtChart and pyqtgraph on PyQt5, but with both libs, I am ending up redrawing the whole ...
0
votes
1
answer
72
views
Add individual Axis Labels to PyQT chart in Python?
I'm in the final portion of my project and we just need to make a graph showing the number of shows and movies with their rating trend. I have 4 different bar graph items and I was wondering if there'...
0
votes
1
answer
41
views
How to merge two PlotItems into one csv file?
Is it possible to merge two plot items and export them as one csv file? I'm using pyqtgraph to visualise two graphs with common x axis whilst the y-axes are different. I can export them separately as ...
0
votes
1
answer
71
views
Antialiasing images in pyqtgraph ImageView
I am using PyQtGraph and am really enjoying it, but have hit upon an issue that may force me to move to something else.
I am displaying medical images (CT/MRI etc.) as numpy 2D or 3D arrays in the ...
-3
votes
1
answer
67
views
text in axes pyqtgraph [closed]
how to add text in vertical axes in pyqtgraph(other than label for axes).
when use TextItem, add text in ViewBox not in axesenter image description here
0
votes
1
answer
103
views
pyqtgraph: completely clear PlotWidget
I am basically using the code from this example: https://github.com/pyqtgraph/pyqtgraph/blob/develop/examples/MultiplePlotAxes.py but I am adding and removing the additional axes during runtime. ...
0
votes
1
answer
71
views
Is there a way to prevent a rectangular pyqtgraph ROI to not move left-right?
I have this snippet from part of a code I'm working on with pyqtgraph ROI. I have also set boundaries in which the ROI cannot cross on all sides. When I move either of the vertical scale handles, it ...
0
votes
1
answer
157
views
pyqtgraph: Add Items from seperate ViewBox to Legend
I am basically using the code from this example: https://github.com/pyqtgraph/pyqtgraph/blob/develop/examples/MultiplePlotAxes.py but I added a legend to it using pw.addLegend(). My problem is that ...
0
votes
0
answers
78
views
Real time pltotting on a GUI from a CSV file with PyQTgraph error
I'm working on a PyQT5 app that plot in real time data read from a sensor.
Here is the portion of code :
from PyQt5 import QtWidgets, QtCore
from pyqtgraph import PlotWidget, plot
import pyqtgraph as ...
0
votes
0
answers
41
views
plotting points in 3d surface using x,y,z coordinates using pyqtgraph
I have a set of points set = [[x1,y1, z1], [xn, yn, zn]]
How can I draw 3d plot using a pyqtgraph? I need to calculate vertexes and faces?
Thank you for your response.
1
vote
1
answer
107
views
Generating Scatter Plot from a Matrix
I have a code that generates random matrices of 0's and 1's, and I'd like to convert these matrices into scatter plots, where the coordinate corresponds to the matrix row/column, and the color of the ...
0
votes
1
answer
71
views
How to plot stacked bar graphs with different number of values
I have read Set multiple colors for bargraphitem in pyqtgraph and it was very useful, however, in that example all the arrays have the same number of values.
I have multiple arrays, and not all of ...
0
votes
0
answers
160
views
How can I insert pyqtgraph into a gui edited with a qt designer?
I drew a pyqtgraph in real time and made it into a widget through Python to test if it actually works. As a result, it was possible to obtain a graph that operates in real time as shown in the picture ...
0
votes
1
answer
54
views
Python PyQtGraph - how to use setTicks?
I want to display xticks only at the locations of data points (so the xticks == wavelengths). How can I do this?
Here is my code:
from PyQt6.QtWidgets import QApplication
import pyqtgraph as pg
app = ...
0
votes
0
answers
24
views
how to hold the points plotted in pyqtgraph?
I was plotting a real time plot using pyqtgraph. The points are plotted very fast and clears after plotted. I want to hold the points for few seconds. How to do this in pyqtgraph?
0
votes
1
answer
25
views
how to use some variables defined in one fucntion in another function?
I have a function defined as below:
def mod2():
while true:
I = raw_results[0]
Q = raw_results[1]
Now I want to define another function def plot_mod() to plot this I,Q. How can I ...
0
votes
1
answer
232
views
Is there any way to insert a 3D image of (STL, OBJ, FBX, and DAE formats) in pyqtgraph 3D plot in python?
I am using PyQT5 for building GUI in python. I need to show a 3D object in a 3D pyqtgraph plot. Is there any way to do so? Please provide if there is any documentation available.
Regards,
Kola
1
vote
0
answers
34
views
emitting pyqtgraph.GraphicsScene.mouseEvents.mouseDragEvent
I am trying to emit a signal which contains an object of the type pyqtgraph.GraphicsScene.mouseEvents.mouseDragEvent but I can't find a way to describe it in the constructor of the signal.
sigDragged =...
1
vote
0
answers
79
views
Show text in 3d pyqtgraph, using GLTextItem class of GLGraphicsItem python
The below code is for creating a GLTextItem from GLGraphicsItem but when the object is called it gives the error
"Error while drawing item <gl_classes.GLTextItem object at 0x000001D903BB34C0&...
0
votes
1
answer
181
views
Set multiple colors for bargraphitem in pyqtgraph
I have a list from 0 to 19, which will be the values of y-axis and a list with different values which will be the WIDTH of the different bars (horizontal bar graph).
x=[5.509, 5.509, 5.414, 5.414, ...