[wxPython-users] Plot, plotting outside y-range ?

Andriy basilisk96 at gmail.com
Sat Aug 11 10:22:59 PDT 2007


>Yes it looks nice now, but ....
>... when I resize the window now,
>the whole window starts to oscillate,
>apparently there are two masters wanting something different
>- one wants scollbars
>- the other don't want scrollbars
>:-(

I noticed this behavior after I sent my response, and by then I could
not find my "Unsend email" button :-)

>Any thoughts of what I should do in the OnResizeEvent,
>I tried it, but apparently a lot happens there,
>so I'ld better not touch that event.

The need for scrollbars is apparently calculated in
_adjustScrollbars() method of PlotCanvas.  It's the last thing called
in _Draw().  But just at first glance, I cannot say that I know how to
override it cleanly.
I have made this hack to my local plot.py in line 1103:
        #self._adjustScrollbars()
By commenting out that call, now the scrollbars are gone for good. But
it hardly seems like a good solution...

>btw, I can easily work around the problem, by clipping the values by my own,
>but I find these contra-intuitive behavior of libraries not very elegant,
>especially when the original library worked as expected.
>( In other words, I think this is a bug ;-)

I agree. I found this new feature a bit frustrating to disable when it
first appeared a while ago. In my case, SetShowScrollbars works
because my plots are less dynamic than yours.

Perhaps this should be a request for wxpython-dev? Someone may help us
both with this.
-amv-




More information about the wxpython-users mailing list