Window resize event

25 views
Skip to first unread message

Al Piszcz

unread,
May 28, 2018, 2:51:29 PM5/28/18
to pyqtgraph
When I resize the window frame the X, Y tick mark / scales do not change. 
Is there an event I can capture to reset the plot area or canvas area to the new size?
Thank you for a great capability.

Al Piszcz

unread,
May 28, 2018, 3:01:57 PM5/28/18
to pyqtgraph
I located this post

Tried similar, however my plot item ScatterPlotItem does not have 'headLen'
    def slot_viewBox_resized(self,viewBox):
        length = viewBox.screenGeometry().height()
        length -= self.s1.opts['headLen']
        self.s1.setStyle(tailLen=length)

        self.s1 = pg.ScatterPlotItem(size=2, pen=pg.mkPen(None), brush=pg.mkBrush(255, 255, 0, 128))

  File "lib\_learn\pyqtgraph\02_pyqt.py", line 57, in slot_viewBox_resized
    length -= self.s1.opts['headLen']
KeyError: 'headLen'
Reply all
Reply to author
Forward
0 new messages