ANN: matplotlib-0.81

Hello John & NG, I have just downloaded matplotlib 0.81,

    > and I am having some problems with the ToolBar. The "Back"
    > and "Forward" icons in the ToolBar2 are not shown. The
    > buttons are completely grey and they seem inactive. Is
    > this the expected behavior? I think it is not. However,
    > my configuration is:

    > - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg
    > backend - ToolBar2

This is a feature and a bug. The feature part is that Werner Bruhin
added a patch to "gray out" the forward and back buttons when clicking
them produces no effect. Eg, if there is no back (your first view of
the figure) the button should be grayed out. If you navigate
somewhere, the button will be enabled.

The bug is that on win32 with wxpython 2.6.1 instead of presenting a
grayed out version of the button the button is a solid gray rectangle,
and it is visually very disturbing to see it toggle between an arrow
and a gray rectangle. On linux with wx 2.5.3, the arrow button still
looks like an arrow, but is gray to indicate "not enabled"

Does this feature work properly for anyone on windows? Other
WX/Windows users, please send me your wxpython version numbers and let
me know if this is working for you so we can file a bug report to the
wx list. You can get your wxpython version by running your script
with

  > python myscript.py -dWXAgg --verbose-helpful

Thanks!
JDH

John Hunter wrote:

"andrea" == andrea gavana <andrea_gavana@...517...> writes:

    > Hello John & NG, I have just downloaded matplotlib 0.81,
    > and I am having some problems with the ToolBar. The "Back"
    > and "Forward" icons in the ToolBar2 are not shown. The
    > buttons are completely grey and they seem inactive. Is
    > this the expected behavior? I think it is not. However,
    > my configuration is:

    > - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg
    > backend - ToolBar2

This is a feature and a bug. The feature part is that Werner Bruhin
added a patch to "gray out" the forward and back buttons when clicking
them produces no effect. Eg, if there is no back (your first view of
the figure) the button should be grayed out. If you navigate
somewhere, the button will be enabled.

Not guilty here, at least not on purpose, someone else might have put in a patch to enable/disable the buttons. But in the disabled state they should still show the black and white version (using the alpha channel).

I looked at it when I saw Andrea's post but can't figure out why they show a grey block instead of a black and white version of the button.

This is a problem I do have on the Win 2000 with my own app/images, but on XP the alpha channel stuff works correctly.

I'll have another look at it.

See you
Werner

···

The bug is that on win32 with wxpython 2.6.1 instead of presenting a
grayed out version of the button the button is a solid gray rectangle,
and it is visually very disturbing to see it toggle between an arrow
and a gray rectangle. On linux with wx 2.5.3, the arrow button still
looks like an arrow, but is gray to indicate "not enabled"

Does this feature work properly for anyone on windows? Other
WX/Windows users, please send me your wxpython version numbers and let
me know if this is working for you so we can file a bug report to the
wx list. You can get your wxpython version by running your script
with

  > python myscript.py -dWXAgg --verbose-helpful

Thanks!
JDH

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20

Hi John,

John Hunter wrote:

"andrea" == andrea gavana <andrea_gavana@...517...> writes:

    > Hello John & NG, I have just downloaded matplotlib 0.81,
    > and I am having some problems with the ToolBar. The "Back"
    > and "Forward" icons in the ToolBar2 are not shown. The
    > buttons are completely grey and they seem inactive. Is
    > this the expected behavior? I think it is not. However,
    > my configuration is:

    > - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg
    > backend - ToolBar2

This is a feature and a bug. The feature part is that Werner Bruhin
added a patch to "gray out" the forward and back buttons when clicking
them produces no effect. Eg, if there is no back (your first view of
the figure) the button should be grayed out. If you navigate
somewhere, the button will be enabled.

Just did a little test with the back.png file - see attached it shows in black and white if it is NOT enabled.

However here stops the good news, I can't figure out what needs to be changed in matplotlib to get the same result. Hacked "_load_bitmap2" which used the "png" file but then I get the normal image instead of the black and white one.

I'll keep looking, but if anyone has an idea it will be very welcome.

See you
Werner

toolbartest.png

···

The bug is that on win32 with wxpython 2.6.1 instead of presenting a
grayed out version of the button the button is a solid gray rectangle,
and it is visually very disturbing to see it toggle between an arrow
and a gray rectangle. On linux with wx 2.5.3, the arrow button still
looks like an arrow, but is gray to indicate "not enabled"

Does this feature work properly for anyone on windows? Other
WX/Windows users, please send me your wxpython version numbers and let
me know if this is working for you so we can file a bug report to the
wx list. You can get your wxpython version by running your script
with

  > python myscript.py -dWXAgg --verbose-helpful

Thanks!
JDH

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20

Hi John and Andrea,

John Hunter wrote:

"andrea" == andrea gavana <andrea_gavana@...517...> writes:

    > Hello John & NG, I have just downloaded matplotlib 0.81,
    > and I am having some problems with the ToolBar. The "Back"
    > and "Forward" icons in the ToolBar2 are not shown. The
    > buttons are completely grey and they seem inactive. Is
    > this the expected behavior? I think it is not. However,
    > my configuration is:

    > - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg
    > backend - ToolBar2

This is a feature and a bug. The feature part is that Werner Bruhin
added a patch to "gray out" the forward and back buttons when clicking
them produces no effect. Eg, if there is no back (your first view of
the figure) the button should be grayed out. If you navigate
somewhere, the button will be enabled.

The grey square is due to using "xpm" file formats for the button images (disabled state).

Attached is a version backend_wx.py which uses "png" files for the
"back" and "forward" button. In theory this should show a black & white
version of the button when it is disabled (applying the alpha channel,
only supported by wx with png files).

However for whatever reason this does not work with matplotlib's
toolbar, it works very nicely when I create a test toolbar (see the
image sent with my previous mail on this thread, or run the attached wx_cursor_demoToolbar.py using the attached backend_wx.py).

I tried to narrow it down but but up to now without any luck.

I attached a demo file which shows how the button should look (hacked together toolbar with only back and forward button). If you change the two lines below in the demo (comment the myadd_toolbar line and uncomment the other one you will get the normal matplotlib toolbar, but the disable button stuff doesn't work.

## self.add_toolbar() # comment this out for no toolbar
         self.myadd_toolbar()

Maybe someone else who know matplotlib better then I do might have an idea on what is going on.

See you
Werner

backend_wx.py (68.9 KB)

wxcursor_demoToolbar.py (6.46 KB)

···

The bug is that on win32 with wxpython 2.6.1 instead of presenting a
grayed out version of the button the button is a solid gray rectangle,
and it is visually very disturbing to see it toggle between an arrow
and a gray rectangle. On linux with wx 2.5.3, the arrow button still
looks like an arrow, but is gray to indicate "not enabled"

Does this feature work properly for anyone on windows? Other
WX/Windows users, please send me your wxpython version numbers and let
me know if this is working for you so we can file a bug report to the
wx list. You can get your wxpython version by running your script
with

  > python myscript.py -dWXAgg --verbose-helpful

Thanks!
JDH

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20