pyqtgraph

How to pass changing/updating data to another pop-up window?

僤鯓⒐⒋嵵緔 提交于 2021-02-11 17:36:02
问题 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 timer to update the data (the updateData() funciton). I want to see the green curve in the pop-up window changes... But I cannot find an effective way to pass the changing data to the pop-up window. Should I use the pyqtSignal() to define a custom signal? I read this page. Should I define the

Mouse coordinates of pytqt graph line

时光怂恿深爱的人放手 提交于 2021-02-07 20:28:38
问题 I am trying to get the (x,y) values of my random function plot whenever I move the moused on top of the graph. I am using pyqtgraph.SignalProxy and connect it to a callback mousedMoved. I am getting this as error: NameError: global name 'mouseMoved' is not defined Here is the code: import sys from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg import time import random class TestClass(QtGui.QMainWindow): ##################################################### def _

Mouse coordinates of pytqt graph line

流过昼夜 提交于 2021-02-07 20:28:15
问题 I am trying to get the (x,y) values of my random function plot whenever I move the moused on top of the graph. I am using pyqtgraph.SignalProxy and connect it to a callback mousedMoved. I am getting this as error: NameError: global name 'mouseMoved' is not defined Here is the code: import sys from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg import time import random class TestClass(QtGui.QMainWindow): ##################################################### def _

How to update a plot in pyqtgraph?

我只是一个虾纸丫 提交于 2021-02-07 10:09:04
问题 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 curve. There are two checkboxes with texts A1 and A2 and each of them plot one set of data. I have two issues: 1- If I select A1 it plots the data associated with A1 and as long as I do not select A2 , by deselecting A1 I can clear the data associated

Real-Time-Plotting using pyqtgraph and threading

…衆ロ難τιáo~ 提交于 2021-02-06 12:53:06
问题 this is a bit longer, the first part is just a description of the problem, the second one the question if my "fix" is correct. I started with python programming. I created a program that communicates with an Arduino that reads the temperature of a furnace of our melting lab. The temperature is then used in a PID algorithm and an output is set to the Arduino. The communication is done via pyserial. So far, everthing works, including live plotting of the temperature signals, PID-variables and

Plotting with pyqtgraph without displaying

。_饼干妹妹 提交于 2021-02-05 08:09:10
问题 I am trying to move from matplotlib to plotting with pyqtgraph because of its touted capabilities to render and save images faster. In my attempts to do this on a cluster with multiprocessors, I run into the following trouble: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user' qt.qpa.screen: QXcbConnection: Could not connect to display Could not connect to any X display. How do I obviate displaying a plot, and save it directly to file? Here's my attempt at the code:

Plotting with pyqtgraph without displaying

有些话、适合烂在心里 提交于 2021-02-05 08:08:30
问题 I am trying to move from matplotlib to plotting with pyqtgraph because of its touted capabilities to render and save images faster. In my attempts to do this on a cluster with multiprocessors, I run into the following trouble: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user' qt.qpa.screen: QXcbConnection: Could not connect to display Could not connect to any X display. How do I obviate displaying a plot, and save it directly to file? Here's my attempt at the code:

Accurate timer with PyQt

六眼飞鱼酱① 提交于 2021-01-29 13:32:10
问题 I'm using pyqtgraph to plot a huge number of data that I receive from sensors. To do so, I made one thread that acquire the data and put in a queue. To plot the data, I check periodically with a timer if the queue is not empty. The problem is that the accuracy of the timer (QTimer) seems to be really bad. I mean when the load is low (sleep for 1000/100 ms) in the measuring thread, the accuracy is pretty good but when the load increase (sleep for 10ms), my update function used to plot data is

Realtime visualisation bottleneck with pyqtgraph / PlotCurveItem

我与影子孤独终老i 提交于 2021-01-29 12:32:03
问题 I am currently using pyqtgraph to visualize realtime data for 64 independent data traces/plots. While the speed is realtively good, I noticed a serious slow down if the sample buffer length reaches beyond 2000 points. Profiling the following code yields that functions.py:1440(arrayToQPath) seems to have a major impact: import numpy import cProfile import logging import pyqtgraph as pg from PyQt5 import QtCore,uic from PyQt5.QtGui import * from PyQt5.QtCore import QRect, QTimer def program

pyqtgraph ImageView Freezes when multithreaded

为君一笑 提交于 2021-01-28 04:09:45
问题 I have multiple cameras that are hooked up wirelessly via wifi and I'm trying to stream the data to a client, which displays the streams on a GUI. My issue is that the pyqtgraph ImageItems seem to stop repainting after about 30 seconds, or if I click out of the window, or if I adjust the controls on one of the images. After that, I can manage to get the images to repaint by resizing the window, but that's kind of tedious. I thought maybe pyqtgraph wasn't threadsafe, but I don't even know if I