pyqtgraph

Why pyqtgraph legend text cannot contain '>', '<=', etc

Why pyqtgraph legend text cannot contain special characters like: '>', '<' Question: I am plotting data with pyqtgraph inside a PySide6 Application. Anyways, the problem is that the text gets cut off if a name contains a special character like ‘<‘ or ‘>’. Here is a minimal example: from PySide6 import QtCore, QtWidgets import pyqtgraph …

Total answers: 2

Is there a function to save a snapshot of a qt widget in a variable?

Is there a function to save a snapshot of a qt widget in a variable? Question: 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 …

Total answers: 1

How to change alignment of PyQtGraph legend?

How to change alignment of PyQtGraph legend? Question: 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 to the left axis and only way …

Total answers: 1

How to plot hour:min time in ISO 8601 time format?

How to plot hour:min time in ISO 8601 time format? Question: I am trying to plot temperature data points according to their time recording. t = [‘2021-12-11T0:6:15’, ‘2021-12-11T7:15’, ‘2021-12-11T8:15’, ‘2021-12-11T9:15’, ‘2021-12-11T10:15’] temp = [33.6, 33.6, 33.6, 33.6, 33.6] Note: as you have mentioned t is represented without hour, the reason is that temp been collected …

Total answers: 1

Multiple live plot GUI using pyqtgraph and PyQt5

Multiple live plot GUI using pyqtgraph and PyQt5 Question: I am trying to create a gui with several live plot EEG/ECG graphs (each plot on different axes). From what I understand, I need to create multiple PlotWidgets inside a grid layout. I have created a live plot using pyqtgraph, below however I am unsure how …

Total answers: 1

pyqtgraph image point selection

pyqtgraph image point selection Question: I’m trying to make a tool for my lab for manual image registration–where the user can select some points on two different images to align them. I made this in matplotlib, but zooming in/out was way too slow (I think because the images we’re aligning are pretty high res). Is …

Total answers: 1

Hover Tool for plots in Pyqtgraph

Hover Tool for plots in Pyqtgraph Question: I want to have data information shown when hovering over a line in pyqtgraph plots, but can’t get my sigpointsHovered to emit any signal. Here is a simple example of what i tried to do: from PySide6.QtWidgets import QMainWindow, QWidget, QApplication, QVBoxLayout import pyqtgraph as pg def hovered(self, …

Total answers: 2

Is it possible to use pyqtgraph functions to plot inline on Jupyter Notebook?

Is it possible to use pyqtgraph functions to plot inline on Jupyter Notebook? Question: 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(recon_array_a[0]) This is giving me what I need but …

Total answers: 3

finplot as a widget in layout

finplot as a widget in layout Question: I am trying to add finplot, https://pypi.org/project/finplot/, as a widget to one of the layouts in my UI. I created a widget for finplot and added it to the widgets in the layout but I get the following error: self.tab1.layout.addWidget(self.tab1.fplt_widget) TypeError: addWidget(self, QWidget, stretch: int = 0, alignment: …

Total answers: 3

attributeerror module 'time' has no attribute 'clock' (pyqt5)

attributeerror module 'time' has no attribute 'clock' (pyqt5) Question: I understand that time.clock() has been deprecated since Python 3.3. However, the error is occurring when I am trying to import the pyqtgraph module: import pyqtgraph That is the only line in the file, and this is the error: File “D:2020Backup2020BackupcodePythonPyQtgraphsfirst.py”, line 1, in <module> import …

Total answers: 2