--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/6e624762-ebb4-4452-9957-641d108b4716%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
One that I have seen recently matching your symptoms is that if you plot values that cover a very large range, this can result in floating-point errors in the GraphicsView bounds checking, which can then cause failures to update (because the view doesn't think the plot is visible).
On Sat, Nov 12, 2016 at 8:14 AM, Luke Campagnola <luke.ca...@gmail.com> wrote:
There are many reasons this could be happening. The easiest way for us to help is if you can provide a minimal working example.As a start, I would check to see whether the problem persists if you run the script without pycharm.
On Fri, Nov 11, 2016 at 9:45 AM, Thomas Grübler <thomas....@gmail.com> wrote:
Hello,I write an application that displays something like an oscilloscope with real time values.Sometimes, it just stops updating the graph. Just when I change the window size, it shows the new curve, but then just one frame.The major problem is, I would like to write a bug report, but I do not get any error message in PyCharm. When using the debugger, all objects/pointers etc are present.Even worse, I do not have a real way to reproduce the behavior. Sometimes it is easy, sometimes it is not possible.For reproducing, I stop updating my curve entries for a minute, and then start again.My software is normally updating the curve entries every 0.01s.Any idea, how to produce an error message if it is freezing to find the problem?The freeze occurs using Python 3.4 (Anaconda) and with both PyQtGraph 0.9 and 0.10.Thanks very much!Thomas
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/29c098b7-e2e6-4d38-a3a0-9c72b49cd9f9%40googlegroups.com.
from pyqtgraph.Qt import QtCore, QtGui
from threading import Thread, Event
import time, random
Traceback (most recent call last): File "/home/patrick/Documents/pyqtgraph-test/pyqtgraph/graphicsItems/ImageItem.py", line 420, in paint p.drawImage(QtCore.QRectF(0,0,*shape), self.qimage)TypeError: arguments did not match any overloaded call: drawImage(self, QRectF, QImage, QRectF, flags: Union[Qt.ImageConversionFlags, Qt.ImageConversionFlag] = Qt.AutoColor): argument 2 has unexpected type 'NoneType' drawImage(self, QRect, QImage, QRect, flags: Union[Qt.ImageConversionFlags, Qt.ImageConversionFlag] = Qt.AutoColor): argument 1 has unexpected type 'QRectF' drawImage(self, Union[QPointF, QPoint], QImage, QRectF, flags: Union[Qt.ImageConversionFlags, Qt.ImageConversionFlag] = Qt.AutoColor): argument 1 has unexpected type 'QRectF' drawImage(self, QPoint, QImage, QRect, flags: Union[Qt.ImageConversionFlags, Qt.ImageConversionFlag] = Qt.AutoColor): argument 1 has unexpected type 'QRectF' drawImage(self, QRectF, QImage): argument 2 has unexpected type 'NoneType' drawImage(self, QRect, QImage): argument 1 has unexpected type 'QRectF' drawImage(self, Union[QPointF, QPoint], QImage): argument 1 has unexpected type 'QRectF' drawImage(self, QPoint, QImage): argument 1 has unexpected type 'QRectF' drawImage(self, int, int, QImage, sx: int = 0, sy: int = 0, sw: int = -1, sh: int = -1, flags: Union[Qt.ImageConversionFlags, Qt.ImageConversionFlag] = Qt.AutoColor): argument 1 has unexpected type 'QRectF'
import numpy as npfrom PyQt5 import QtWidgetsfrom PyQt5.QtCore import pyqtSignal, pyqtSlotimport pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
from pyqtgraph import GraphicsLayoutWidget
from threading import Thread, Eventimport time
# Routine to acquire and serve data# This might be a camera driver, notifying when a new frame is available
def generate_data(callback, threadkill):
while not threadkill.is_set(): width = 1600 data = np.zeros(width) data += np.cos(np.arange(0, 10*np.pi, 10*np.pi/width) - 9*time.monotonic()) data += np.cos(np.arange(0, 4*np.pi, 4*np.pi/width) + 4*time.monotonic())
callback(data) time.sleep(0.01)
class PyQtGraphTest(GraphicsLayoutWidget):
# Signal to indicate new data acquisition # Note: signals need to be defined inside a QObject class/subclass data_acquired = pyqtSignal(np.ndarray)
def __init__(self): super().__init__()
self.setWindowTitle('Test pyqtgraph paint signals') self.resize(640, 400) self.plot = self.addPlot() self.spectrum = self.plot.plot() self.plot.enableAutoRange(pg.ViewBox.XYAxes)
# Connect the signal self.data_acquired.connect(self.update_data)
# Make and start the background thread to acquire data # Pass it the signal.emit as the callback function self.threadkill = Event() self.thread = Thread(target=generate_data, args=(self.data_acquired.emit, self.threadkill)) self.thread.start()
# Kill our data acquisition thread when shutting down def closeEvent(self, close_event): self.threadkill.set()
# Slot to receive acquired data and update plot @pyqtSlot(np.ndarray) def update_data(self, data): self.spectrum.setData(data)
if __name__ == '__main__': import sys
app = QtWidgets.QApplication(sys.argv) window = PyQtGraphTest() window.show()
if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
sys.exit(app.exec_())
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/33354545-4130-46cb-a9c6-91720c819780%40googlegroups.com.