Questions tagged [pyqtgraph]
High-performance scientific graphics for PyQt.
975
questions
0
votes
0
answers
22
views
How to add axes labels/ticks to a 3D line plot using pyqtgraph?
Is there any way to add the axes grid labels to the following 3D line plot using pyqtgraph? Seeing the limits on each x, y, z axes as well as their grid labels will help with a better understanding of ...
0
votes
0
answers
14
views
When using pyqtgraph's GraphItem, are there built-in layouts such as the networkx spring_layout or spiral_layout?
In networkx, I can choose from various built-in layouts. For example, if G is my graph, then
pos=nx.spiral_layout(G)
nx.draw_networkx(G,pos)
plots my network using the spiral_layout.
Suppose I'm ...
0
votes
1
answer
42
views
How to suppress qt.pointer.dispatch warning
Since upgrading from PyQt5 to PyQt6, I have been getting the following warning whenever my mouse enters or leaves a pyqtgraph GraphicsView widget:
qt.pointer.dispatch: skipping QEventPoint(id=0 ts=0 [....
0
votes
1
answer
32
views
Catching the position of the mouse on a keyPressEvent in pyqtgraph ViewBox
I'm trying to get the position of the mouse on a keyPressEvent of a custom pg.ViewBox.
The only solution I've found so far is to create some crosshairs and get the position of those on a keyPressEvent....
0
votes
0
answers
20
views
Grid scaling in pyqtgraph using GLGridItem and GLViewWidget
The question is quite specific and is about pyqtgraph. I need to implement GLGridItem grid scaling. I.e. when the mouse wheel moves, the frequency of the grid lines changes (when approaching — the ...
0
votes
0
answers
28
views
PyQtGraph: get SpotItem objects within ROI selection
Using PyQt5 and PyQtGraph, I have a circular Scatter Plot displayed on top of an image. Both these items are inside a QGraphicsView, which was promoted from an ImageView object. I am trying to find an ...
0
votes
0
answers
11
views
how to change title fontsize in pyqtgraph
is there any way to change title fontsize if i use GraphicsLayoutWidget? thanks
'''
self.pg_widget = pg.GraphicsLayoutWidget(show=False)
self.pg_plot = self.pg_widget.addPlot(row=0, col=0, title="...
0
votes
0
answers
34
views
Python version not finding PyQtGraph module
I have been unable to connect Python with PyQtGraph and I can't see where the problem lies and how to solve it.
I'm using MacOS Ventura. The version of Python I'm using is 3.11.2.
I try to run a ...
1
vote
1
answer
56
views
How can I disable mouse movement of a PyQtGraph legend?
I'm creating a simple PyQtGraph plot with a legend, and I'd like to disable all interactivity.
I'm able to disable panning and zooming as well as the right-click context menu, but the legend can still ...
0
votes
0
answers
25
views
Point cloud color display problem when using GLScatterPlotItem
When using GLScatterPlotItem to assign the same color to the point cloud, it can display normally, but when assigning RGB image color, many points will display white.
enter image description here
No ...
0
votes
2
answers
183
views
AttributeError: module 'pyqtgraph.Qt.QtGui' has no attribute 'QApplication'."
Details about my system;
Ubunttu 22.04.2 LTS x86_64
pyqtgraph v0.13.1
pyhton v3.10
The code I'm trying to run on line 56;
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
app = QtGui....
0
votes
1
answer
34
views
Is there a function to save a snapshot of a qt widget in a variable?
I am trying to create a function to export an animated plot to a video format. This plot is a qt widget. I believe the first step in this is to transform a single image into a bytearray or a pillow ...
0
votes
1
answer
40
views
PyQt5 layout.addWidget will not accept pyqtgraph widget [duplicate]
I am trying to add a GraphicsLayoutWidget from pyqtgraph to a PyQt application. On multiple machines, the code below works without error: I see a QLineEdit input textbox above a black square.
import ...
0
votes
0
answers
24
views
How can we read the file with when I clicked calculate button and entered a float or int in text label
I would like to enter a float or int value, which is already exist in a csv file, in text label button and then when I click the calculate button should read the complete csv file and choose the ...
0
votes
1
answer
29
views
App created using Pyinstaller unable to run due to pyqtgraph colormap issue
I have a simple script that uses pyqtgraph to create a heatplot animation. I receive no error messages when converting it to an .app using pyinstaller. However, when attempting to run the .app from ...
0
votes
0
answers
59
views
Speed up graphic drawing pyqtgraph
I wonder is there any way to speed up graphics drawing. I use pyqtgraph, but it's still to slow for my case: draw a few lines with several million points.
I read about Numda, but don't fully ...
0
votes
0
answers
23
views
In PyQt, how can I cycle through multiple copies of a widget and have each of them remember their state?
I'm building a program where a user can interact with a pyqtgraph ImageView (e.g. place markers, change brightness and contrast). I want to be able to cycle through different images, but have each ...
0
votes
0
answers
23
views
I need only one graph to be erased, and the rest remain on the widget
Here's what I wrote:
def checked_value(self):
if self.ui.dollar.isChecked():
self.ui.curslbl1.setText("1 USD = " + json.dumps(convert(base='USD', amount=1, to=['RUB']))[8:...
1
vote
1
answer
49
views
Order of placement of widgets in PyQt: Can I place a GraphicalLayoutWidget on a QHBoxLayout?
I'm new to PyQt and pyqtgraph and have a heatplot, which I'd like to place on a widget (if that's the right term), adjacent to which a slider will eventually appear. The code I have thus far, which is ...
0
votes
0
answers
25
views
How to customize labels of a heatmap created using pyqtgraph?
I'm transitioning from tkinter with matplotlib to PyQt with pyqtgraph and wish to create a simple heatmap, with labels coming from a list of strings. I have no experience with PyQt nor pyqtgraph, and ...
0
votes
2
answers
73
views
QGridLayout creates an incorrect layout in PyQt5
I am having an issue with QGridLayout using PyQt5. In my UI, I have two pyqtgraph PlotWidget(). One of them contains 5 different plots and the other one has only one. I want the PlotWidget() with 5 ...
2
votes
2
answers
90
views
pyqtgraph plot not filling whole widget (from qt designer)
I'm trying to embed a pyqtgraph plot in my PySide6 app but the plot is not filling the whole widget:
I want the whole PlotWidget to be filled. The PlotWidget got created with QT-Designer.
The App:
...
0
votes
1
answer
54
views
Fast plotting of large amount of rectangles with pyqtgraph
Background: need to plot a large amount of rectangles (can be ~10 million of them) interactively.
found out about pyqtgraph and tried the following:
class Visualizer:
def __init__(self):
...
0
votes
1
answer
38
views
Smaller QPolygon in PyQt than 1 not drawing
So im trying to use the drawPolygon() function to draw some shapes in a plot. After a lot of trouble I tried painting this two polygons, the first one does not work and the second one yes:
points1 = ...
0
votes
1
answer
74
views
How to change alignment of PyQtGraph legend?
I am trying to make a good-looking graph inside my interface and due to this, the legend has to be on a right side of the widget. Is it possible to do this?
As a default, the legend appears sticking ...
0
votes
1
answer
36
views
Is it possible logging another GUI in the QThread
import sys
from PyQt5.QtWidgets import *
import pyqtgraph as pg
import logging
import threading
from tqdm import tqdm
import time
class MyWindow(QMainWindow):
def __init__(self):
super()....
0
votes
0
answers
42
views
Plot Trajectory of Tracked Objects: PyQtGraph
I need to plot a trajectory of tracked objects in PyQtGraph. For this, to make this application dynamic, I need to concatenate variable names with numbers like this
self.plot(X1, Y1....)
self.plot(X2, ...
0
votes
0
answers
56
views
Pyqtgraph adds extra point in 3D GLViewWidget
I made an app to plot data from .log file. This app has a button, which opens second window, where I try to make a 3D simulation according to some data. In fact MainWindow displays SimulationWindow in ...
0
votes
2
answers
112
views
Cannot emit Signal in PyQT
class MyPlotWidget(pg.PlotWidget):
myplotSignal = QtCore.pyqtSignal(int)
def __init__(self):
super().__init__()
self.clickplotSignal = self.scene().sigMouseClicked
self....
0
votes
1
answer
43
views
PyQt Freezing while many graphs plotting
def initPlots(self):
print("init_Plots")
for S in range(self.sensor_num):
globals()["self.plot{0}".format(S)] = pg.PlotWidget()
globals()["self.plot{0}&...
0
votes
0
answers
25
views
Pyqtgraph plot symbols do not scale correctly after zooming with mouse wheel
I monitor folders with a watchdog for new files. If a certain csv file is placed in the folder, it should be read out and the punte should be added to the plot. The plot is displayed as a line with ...
1
vote
2
answers
40
views
pyqtgraph : compute angle in viewbox from data points
I am trying to orient a text item with the appropriate angle from the first 2 points of a curve, basically using the ratio of y-values and x-values to compute the angle of the line. The goal in the ...
0
votes
0
answers
35
views
How to bypass pyqtgraph's built-in methods?
I'm trying to plot a grid of squares given in the following format
{'p0a0': [[1255.1929931640625, 1430.1819458007812, 1428.170166015625, 1253.1811828613281, 1255.1929931640625], [407.78900146484375, ...
0
votes
0
answers
77
views
pyqtgraph : how to allow a plot to only increase its range
I have a xy-plot that updates with new data.
At the first iteration, the XAxis range is automatically set to display the data. On the next iteration, new data is generated, with a potentially smaller ...
1
vote
0
answers
285
views
Jetson nano could not install PyQt5
I am trying hard to install PyQt5 in my Jetson nano. However, there is one thing always annoys me.
here's the feedback message.
note: This error originates from a subprocess, and is likely not a ...
0
votes
1
answer
176
views
How to change the font of Axis label in Pyqtgraph
I have a custom font, I am able to set this font in title of the graph, I need help in setting the axis label font.(left, bottom axis labels)
I am able to set the font to the title of the graph like ...
0
votes
1
answer
58
views
Use pyqtgraph to draw squares in xy coordinates
I am trying to use pyqtgraph to draw a semiconductor wafer map, which is consisted of thousands of squares in different colors and (x, y) coordinates, I'm also expecting to implement hover/mouse click ...
0
votes
1
answer
66
views
PyQt5 - Custom widgets open in separate windows rather than in same window
I'm new at PyQt, and I'm trying to create a main window containing two custom widgets, the first being a data grapher, the second being a QGridLayout containing QLabels. Problem is: the two widgets ...
2
votes
0
answers
39
views
PyQtgraph - Plotting real-time data - Add "line labels" next to graph which move up and down in concert with real-time data (see illustration in post)
I'm plotting 2 lines on a pyqtgraph in real-time (simultaneously), and I'd like to add line labels on the right of the graph, that move up and down with the incoming real-time data, as if 'attached' ...
2
votes
0
answers
25
views
how to change point styles in pyqtgraph
I want to pass styles for different points when plotting
Something like this
curve = self.graphWidget.plot(xs, ys, brushes=['''a list with different styles for points'''])
Tell me how this can be ...
0
votes
0
answers
131
views
pyqtgraph plot line between two points, but color only first part of it
I need to plot a line in pyqtgraph that starts from P1 and is pointing towards P2, but only color the first part of it (length of the colored part depends on a variable)
I can plot the entire line ...
0
votes
0
answers
39
views
RightToLeft QT application cause pyqtgraph plot y-grid displacement
Here is my problem:
The proper way to turn a QT application into a RightToLeft one, is to initiate with:
app = QtWidgets.QApplication(sys.argv)
app.setLayoutDirection(Qt.RightToLeft)
But than ...
1
vote
0
answers
27
views
displaying sound in Python GUI
I have a class that connects to the microphone of the laptop and plots the frequency of the sound in real-time in a new window but I want to display the result in a GUI that I prepared.
can you help ...
1
vote
0
answers
68
views
Pyqtgraph: How do I update the X-Axis values without it moving
So I have found this code that creates a python graph that is updated a plot in real time that does everything i need, but i would like if instead of the x-axis moving the values are updated. I have ...
0
votes
0
answers
75
views
How do you add a PlotWidget to the CentralWidget of a MainWindow with PyQt5?
I am building a simply GUI with PyQt5 - the goal is to open a directory which is filled with data files and automatically make a plot from each file, with arrow buttons that let me click through the ...
1
vote
0
answers
53
views
How to recreate Orange3 scatter plot option "color regions" in pyqtgraph
I made a plot I really like in Orange3. It looks like this:
I would like to recreate it outside of Orange3 (I want to generate it in realtime inside a game based on sprite movement)
I dug into the ...
0
votes
0
answers
72
views
How to create a floating window of selection tools for highlighting regions of a pyqtgraph?
I would like to add some selection tools to a pyqtgraph. The idea is that I would have a floating window on the graph that has for instance a rectangle or a circle tool. Then the user could place the ...
0
votes
0
answers
45
views
Enable alpha in pyqtgraph
I'm trying to enable alpha blending in pyqtgraph using the following bit of code (as suggested here):
from OpenGL.GL import *
...
graph = gl.GLViewWidget()
glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, ...
0
votes
0
answers
51
views
ROI Boxes specified on specific frames using 3D data in Pyqtgraph app
I'm working with numpy 3D data in my application, which I display using the ImageView class. The code below (copied from GeeksForGeeks is a very close example to it, but I have a custom ROI button ...