I have just committed a significant update to backend_wx.
The intention is that this will be the basis of the backend_wx code in
release 0.40 of Matplotlib. It contains numerous small fixes, but the
- Implemented double-buffered drawing
- GraphicsContextWx now inherits from wxMemoryDC (consequence of double
- Implemented save to JPEG, Windows BMP, PNG, TIF, PCX, XPM formats
- Incorrect initial figure window placement on some Unix platforms
- Mouse wheel (subject to known bug) works in Windows
- Toolbar button presses cause multiple events on Windows platform
- Width of figure frame now correct in Windows
- Figures now respond correctly to resize events
- Sets self._reset = False in AxisTextWx.__set_font() as per info
from JDH in axes.py
- figtext.py now works correctly - text attributes retained correctly
I should note that performance of the double-buffered drawing backend is
not as good as the previous GDI version (at least on Windows), although
animated drawing will be flicker-free. I would be interested to hear
opinions on whether people prefer double buffered drawing or GDI, and
whether it makes sense to support both (as an option when creating a
Known bugs are:
- Mousewheel (on Windows) only works after menu button has been pressed
at least once. I do not plan to fix this since John is planning to
rewrite the navigation code for backend_gtk to work more like matlab.
- Mousewheel on Linux (wxGTK linked against GTK 1.2) does not work at all
Suspect that this is a GTK 1.2 issue, but in any event, it's something
else I don't plan to fix.
- Vertical text renders horizontally if you use a non TrueType font
on Windows. This is a known wxPython issue. Work-around is to ensure
that you use a TrueType font.
- Pcolor demo puts chart slightly outside bounding box (approx 1-2 pixels
to the bottom left). This issue also exists in backend_gtk (the code
in this area is substantially the same for both backends)
- Outputting to bitmap more than 300dpi results in some text being
incorrectly scaled. Seems to be a wxPython bug on Windows for font
point sizes > 60, as font size is correctly calculated. Workaround
is to use DPI <= 300. I only found the problem for 360DPI plots.
With the exception of the known bugs above, please report any other issues
via the matplotlib-devel mailing list. I will try to fix them, but in the
meantime, I'm keen to get a Debian package for 0.4 put together.
John, is it worth activiating the Sourceforge bug tracker after 0.4 release?