From 71636e351868ec9d83fb1c2fb1628d4a37939911 Mon Sep 17 00:00:00 2001 From: 2xB <2xB@users.noreply.github.com> Date: Wed, 8 Apr 2020 17:10:32 +0200 Subject: [PATCH] Fix: Update axes after data is set --- pyqtgraph/graphicsItems/PlotCurveItem.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/graphicsItems/PlotCurveItem.py b/pyqtgraph/graphicsItems/PlotCurveItem.py index fea3834f..e0af8bed 100644 --- a/pyqtgraph/graphicsItems/PlotCurveItem.py +++ b/pyqtgraph/graphicsItems/PlotCurveItem.py @@ -365,11 +365,12 @@ class PlotCurveItem(GraphicsObject): #self.setCacheMode(QtGui.QGraphicsItem.NoCache) ## Disabling and re-enabling the cache works around a bug in Qt 4.6 causing the cached results to display incorrectly ## Test this bug with test_PlotWidget and zoom in on the animated plot + self.yData = kargs['y'].view(np.ndarray) + self.xData = kargs['x'].view(np.ndarray) + self.invalidateBounds() self.prepareGeometryChange() self.informViewBoundsChanged() - self.yData = kargs['y'].view(np.ndarray) - self.xData = kargs['x'].view(np.ndarray) profiler('copy')