Questions tagged [pyqtgraph]
High-performance scientific graphics for PyQt.
771
questions
-1
votes
0answers
19 views
How to implement 'playhead' kind of feature on a simple graph?
Here is what I am trying to achieve:
I have a simple plot of x vs y data plotted using Pyqtgraph
Overlaid on this graph I would like to have a 'playhead' kind of line bar that moves through the x ...
0
votes
0answers
10 views
PyQt5 GLViewWidget rotate object
I have a Glviewwidget that plot a meshed from .stl file ,but as I go through the pyqtgraph document the most I can found is pan() function that it's function is not rotating an object rather than just ...
1
vote
1answer
23 views
Fixed text position using an ImageView within PyQtGraph & PySide2
I am using PyQtGraph and PySide2 to display flat 2D images and 2D slices of 3D volumes (CT/MRI volume datasets etc.) where the user can pan/zoom, scroll etc.
What I would like to do is have text in a ...
-5
votes
0answers
43 views
How to plot six real-time different plots
Receive 1000 messages per second from the port, translate it into the desired format plot 6 different graphs.
I can't find a solution that will can plot 1000 points per second each graph.
The main ...
0
votes
0answers
17 views
register an external exporter to pyqtgraph
I would like to add a format to export plots in a pyqtgraph application. I've dived in the code looking for a way to do that, but from outside the library source code didn't work. Or at least I couldn'...
0
votes
1answer
38 views
Start horizontal pyqtgraph's LinearRegionItem at a certain X tick value
I'm trying to shade a horizontal region on a graph starting at a certain x value. I'm currently using pyqtgraph's LinearRegionItem to create this region, which spans from negative to positive infinity,...
0
votes
1answer
30 views
How to position a pyqtgraph plot at a pixel position in the window?
I have a project where I'm plotting 10 different graphs of data that's coming in over a serial port (I have an Arduino with a bunch of sensors and it's reporting the values, and I want to have a ...
1
vote
1answer
30 views
How can I change mousewheel behaviour in PyQtGraph ImageView?
I am using ImageView to display 2D slices of a 3D volume (MRI scan data) and would like to change the mouse bindings to be more intuitive to the user. By default the mouse wheel changes the image ...
0
votes
1answer
30 views
'ScatterPlotItem' object has no attribute 'geometryChanged'
i want to create a 1D wave visualisation and i use pyqtgraph and pyqt for the visualisation and gui but when i tried to add a scatteritem to my plot i receive the following error but i get no probleme ...
0
votes
1answer
52 views
How to plot the horizontal distance between 2 points on an image with PyQtGraph
I'd like to plot the horizontal distance between 2 points on an image with PyQtGraph, but I can't draw it.
I think it a way of doing this would be to use 3 instances of LineSegmentROI and make them ...
0
votes
1answer
54 views
How do the scaling paramters of ViewBox.setLimits() work?
I'm trying to limit how much a ViewBox can zoom in/out and how much it can be moved.
I know that I must use setLimits() and I've read the documentation here
https://pyqtgraph.readthedocs.io/en/latest/...
0
votes
0answers
24 views
Setting multiple bounds on x-axis to display stock data
I created this stock chart with PyQtGraph PyQtStockGraph
I created the x-axis using a DateAxisItem date_axis = DateAxisItem.DateAxisItem(orientation='bottom'), displaying my x-axis values which are ...
1
vote
1answer
34 views
How do I prevent pyqtgraph from making the axis larger than the widget size?
I have a pyqt5 gui which has two pyqtgraphs inside. The left graph will plot the speed of some object, so will need a dynamically changing y axis and the right plot will show the position, which will ...
1
vote
1answer
36 views
How can I share a pyqtgraph plot between different graphs?
I just started with the pyqt5 and I am working on a GUI and am having a problem sharing a plot between two different graphs. Let me explain it more clearly. Let's say you have a graph1 and a graph2:
...
1
vote
1answer
25 views
How to stop display resolution from affecting axes in pyqtgraph plots
I am using pyqtgraph to plot some data and noticed that when I move the plot from my laptop screen to a second monitor, the scaling on the plot is affected:
laptop monitor:
external monitor:
notice ...
0
votes
1answer
15 views
pyqtgraph LUT histogram element how to apply same transform to the numpy array separately
I made a GUI to edit an image(16 bit grayscale) , everything looks good in the GUI but I need to repeat a step the GUI does for me on my own, I used pyqtgraph... the imageview widget provides a ...
0
votes
1answer
34 views
How to close serial port when closing window with pyqt5
This code reads the output of the arduino fine and live plots the values. But when I close the window, the serial connection doesn't close.
import pyqtgraph as pg
from PyQt5 import QtCore, QtWidgets, ...
0
votes
1answer
28 views
OpenGL import fails with pyqtgraph
I have a conda environment with python 3, pyopengl, and pyqtgraph installed. Running import OpenGL works with no issue, but when I try to run the pyqtgraph examples with python -m pyqtgraph.examples, ...
0
votes
0answers
27 views
How to auto-scale customized string axisItem in pyqtgraph
I would like to have a timeline x-Axis.
For example, starting from 09:00:00 to 11:30:00 then from 13:00:00 to 15:00:00.
Since there is a gap between 11:30:00 and 13:00:00, it seems that the pg....
0
votes
1answer
41 views
Is it possible to pass a variable of type 'type' to a ComboBox so that all the elements of the collection are selectable?
I am trying to create a GUI app that lets me plot any variable against any other variable. This is my first GUI app, so perhaps I'm biting more than I can chew. The values of these variables are in ...
0
votes
1answer
33 views
Scrolling/Zooming within a Plotwidget
i am playing around with a Plotwidget and i cant figure out how i can find the min-max positions from my list when zooming in and out.
Lets say i have a list which has 1000 values. When im scrolling/...
0
votes
0answers
15 views
Int vs float vertex coordinates in PyQt GLMeshItem
The following PyQt code:
import numpy as np
import pyqtgraph.opengl as gl
from pyqtgraph.Qt import QtGui
app = QtGui.QApplication([])
w = gl.GLViewWidget()
w.show()
vertexes = np.array([[0, 0, 1], [...
0
votes
1answer
28 views
Issue with PlotCurveItem and SetLogMode
I tried to implement clickable multiple plot with logarithmic scale.
Because I want to the plots clickable, I used PlotCurveItem() and addItem rather than just use plot(). But unfortunatolly, if I ...
1
vote
1answer
35 views
Drawing graph in the dialogue box in Python
I tried to write a program that uses PyQt5 and pyqtgraph to draw a graph in a dialogue box. That program should create a window with a button. Pressing that button should produce another window with a ...
0
votes
1answer
59 views
Pyqtgraph horizontal bar chart
I am able to create a vertical bar chart using following code:
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
window = pg.plot()
y1 = [5, 5, 7, 10, 3, 8, 9, 1, 6, 2]
x = [1, 2, 3, 4, ...
0
votes
1answer
21 views
Updating the color of a GLMeshItem
I've been trying to update the color of a GLMeshItem in a 3d pyqtgraph plot with some success. Using the setColor() member of the GLMeshItem class, I can set the color initially, and sometimes, the ...
0
votes
0answers
18 views
PyQtGraph MeshItem drops out or flashes white at ~21 frames/s
I am using PyQtGraph MeshItem to display a 3d Spectrogram of an Audio File while it is playing.
The Mesh is 1024 (samples) wide and between 50 and 100 long. It sometimes flashes white or drops out ...
-1
votes
0answers
41 views
How can I use or return the coordinates of pyqtgraph, after clicking, outside the mousePressed function?
I want to access the coordinates outside the mousePress function.
What I want is:
call self.curve.scene().sigMouseClicked.connect(self.mousePress) when PushButton is pressed.
But I am unable to return ...
0
votes
2answers
79 views
How to pass changing/updating data to another pop-up window?
I got the following code for Python GUI. I found I cannot update the data running in the main window to the pop-up window.
In this example I use some random data to mimic the video frames and use a ...
0
votes
0answers
16 views
Extremely simple renderer for 3d lines and .obj files
I wish to render several 3D lines for a stickman in a scene with several .obj files. For visualization, it would be nice to render these objects in a rotatable environment.
What are my easiest options ...
0
votes
0answers
8 views
pyqtgraph - how to render object that has a face with more than 3 vertices?
How can I use pyqtgraph to render an object that has a face with more than 3 vertices? The function provided here https://pyqtgraph.readthedocs.io/en/latest/3dgraphics/meshdata.html only allows a face ...
0
votes
1answer
65 views
Is it possible to recreate a pyqtgraph without data
I have a pyqt5 based application where I open a file and plot 2 different plots based on the data from the file. Now I want to open another similar file, but I want to save the status/view of the 2 ...
0
votes
0answers
101 views
Draw Hexahedral Mesh Efficiently Using OpenGL
I try to implement some kind of mesh visualiser for Finite-Element-Programms in Python. For this, I want to use PyQtGraph. I was able to implement a first version of the Visualiser which is able to ...
0
votes
0answers
36 views
Plot text in PyQtGraph through OpenGl (i.e. in 3D plotting mode)
I have been trying to find a way to render text in PyQtGraph while using OpenGL for 3D plots. One working solution that has been proposed allows rendering simple text but it renders everything on a ...
0
votes
2answers
109 views
How to draw a .obj file in pyqtgraph?
This line of code renders a line.
import pywavefront
import pyqtgraph.opengl as gl
from pyqtgraph.Qt import QtWidgets
import numpy as np
import sys
if __name__ == '__main__':
app = QtWidgets....
1
vote
1answer
154 views
Plotting charts in python cmd.Cmd
I am trying to plot some data in CLI. I am looking to plot multiple charts in separate window and it should not block CLI so that I can still give commands in CLI.
class CLI(cmd.Cmd):
def ...
2
votes
1answer
63 views
pyqtgraph mouse interaction: using mouse right or middle button to zoom to the selected box
in pyqtgraph examples -> View Box Freatures, we could use mouse interaction "left drag zoom to box" by setting v2.setMouseMode(v2.RectMode)
But this interaction is only available in one-...
2
votes
3answers
175 views
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 ...
1
vote
1answer
53 views
pyqtgraph scrolling plots: plot in chunks, show only latest 10s samples in current window
I have trouble using pygtgraph scrolling plots
Expected Results
The expected results are quite similar to the pyqtgraph-examples-scrolling plots-plot5
X-values are times, which can be generated by a ...
1
vote
1answer
69 views
How to show cursor coordinate in pyqtgraph embedded in pyqt5?
I'm following this tutorial. Here is a simple minimal pyqtgrapth embedded in pyqt5. How can I enable pyqtgraph to show cursor coordinate on canvas?
from PyQt5 import QtWidgets
from pyqtgraph import ...
2
votes
0answers
43 views
How to make the zeros coincide in a PyQtGraph? [closed]
I have 3 axes (left, bottom, right) and I can't find a way for the zeros to all be on the bottom left (see figure) please advise?
Here's part of my code:
grid = QtWidgets.QGridLayout(self.Envtab)
...
0
votes
1answer
41 views
Best way to update a pyqtgraph?
I'm developing an app to collect and display experimental data, and control several devices. I'm doing the plotting with a Timer that pulls data from several arrays that are being filled continuously ...
0
votes
0answers
56 views
PyQtGraph live plot multiple lines of data
I'm trying to plot multiple lines of data from an arduino in PyQtGraph. I want that the code itself recognize how many lines of data it has to plot but currently I don't see any data in PyQtGraph.
...
0
votes
1answer
25 views
How to move rect in pyqtgraph
I try to have a rect which moves with the mouse pointer. However, I seem to have a problem with calling the paint method. It either doesn't draw or creates artifacts. The only clean picture I get is ...
0
votes
0answers
52 views
My PyQtGraph code can run with PyQt5, but not
I am trying to make program with PyQtGraph and Qt designer.
My code can run in PyQt5 as expected.
But with PySide2, my code plot the a line outside the plot area.
This is the screenshot of the matter:
...
1
vote
1answer
25 views
pyqtgraph grabFrameBuffer saves an empty image
I have a 3D rendering that looks like the image below that I am trying to save. The image however comes out black with nothing drawn and I am not sure why. I am following the guide here https://...
2
votes
1answer
68 views
Updating pyqtgraph BarGraphItem inside a thread
i have some trouble to make a gui responsive while plotting live data. So that the GUI doesn't freeze, I try to thread all of my activities. I want to realize the following:
Recording data through a ...
1
vote
2answers
93 views
Is it possible to use pyqtgraph functions to plot inline on Jupyter Notebook?
I am trying to use Pyqtgraph to plot some image arrays on Jupyter notebook, but I am having some problems. Basically, I'm using the following code:
import pyqtgraph as pg
%gui qt
pg.image(...
0
votes
1answer
34 views
pyqtgraph ErrorBarItem doesn't draw a vertical line connecting horizontal error bars
Consider following code:
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
pg.setConfigOptions(antialias=True)
yPoints = np.array([4.2315e-12, 5.0400e-12, 4.7119e-12, ...
1
vote
1answer
106 views
How to plot 2D data (image) with x and y coordinates
I would like to plot a 2D spectrum where the x coordinate is the spectral dimension (wavelength) and the y coordinate is the spatial dimension (in arcseconds of the sky) using pyqtgraph.
I've been ...