Hi, My code manages the items in the legend manually. When a new series is plotted, it calls
legend.addItem(self.pointerToPlot, self.legendtext) and when removing legend.removeItem(self.legendtext) After creation, I do not interact with the legend in any other way. This works, but if I repeat this process (adding and removing the same item), the legend item moves to the right a couple of pixels each time. If I print legend.layout.geometry(), this effect can be seen PyQt5.QtCore.QRectF(0.0, 0.0, 96.0, 120.0) PyQt5.QtCore.QRectF(0.0, 0.0, 98.0, 120.0) PyQt5.QtCore.QRectF(0.0, 0.0, 100.0, 120.0) PyQt5.QtCore.QRectF(0.0, 0.0, 102.0, 120.0) PyQt5.QtCore.QRectF(0.0, 0.0, 104.0, 120.0) PyQt5.QtCore.QRectF(0.0, 0.0, 106.0, 120.0) PyQt5.QtCore.QRectF(0.0, 0.0, 108.0, 120.0) I suspect the issue lies inside the LegendItem.updateSize function, though I do not immediately see a reason for the behavior I observe. Anybody have any ideas? I am using pyqtgraph v 0.10.0 and PyQt 5.6.2 on Windows 7/Anaconda Thank you -- 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/bc5cc92e-5792-4a7d-893f-9d0e0c6cc045%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
