Hi, The example code below adds a TextItem next to each data point in the plot. At runtime, I manually reduce the height of the window, which results in an updated range for the Y-axis. However, upon further reducing the height of the window, the Y-axis range suddenly starts to rapidly cycle through ever-increasing negative numbers. And this cycling does not stop, until one increases the window height again.
This behavior only occurs when TextItems are present in the plot. Hence, one hypothesis is that the fixed height of the font of the TextItem leads to some cyclic behavior of when setting the range of the axis. I found some similarities with what was reported by another user here: https://groups.google.com/d/msg/pyqtgraph/4gvXfv_p5aU/68hgnGME3XcJ The issue was never solved/understood, only side-stepped. Are there any suggestions on how to prevent this cycling of the Y-axis range when reducing the window height? Here is the code (pyqtgraph 0.10, pyqt 4.11): from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg app = QtGui.QApplication([]) win = pg.GraphicsWindow() p1 = pg.PlotItem(y=np.random.normal(size=100)) win.addItem(p1) curve = p1.curves[0] for x, y in zip(curve.xData, curve.yData): marker = pg.TextItem("W") marker.setPos(x, y) p1.addItem(marker) if __name__ == '__main__': import sys if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'): QtGui.QApplication.instance().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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/1b6e40f1-8055-4746-8a75-af76876b0d34%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
