A very basic sample using matplotlib/pylab with WX backend seems to
work ok in 2.8.12.1 and 2.9.1.1 but has errors in 2.9.2.1.
Basically, the graph area is inactive and transparent - showing the
screen below this active frame; with resizing and moving this frame,
there are artefacts and display glitches and redrawing errors around
it, but the graph is not shown and there are no exceptions thrown.
(Using Python 2.7.2, matplotlib 1.0.1; win 7; wxPython 32bit (unicode)
- the mentioned versions)
Unfortunately, I couldn't find the offending code in matplotlib
source; but it might be a problem within wxpython, given the
differences between versions.
The problem only appears in the WX backend in matplotlib, WXAgg works
(in this regard) in all three wxpython versions.
Is there something obvious I should look into? Should I report this to
the tracker?
regards,
vbr
# # # # # # # # # # # pylab - wxPython # # # # # # # # # # # # # # # # #
#! Python
# -*- coding: utf-8 -*-
import wxversion
# wxversion.select('2.8') # 2.8.12.1 ok
# wxversion.select('2.9.1') # 2.9.1.1 ok
wxversion.select('2.9.2') # 2.9.2.1 !! display errors in pylab
import wx
import matplotlib # http://matplotlib.sourceforge.net/
# matplotlib.use('WXAgg') # ok in both, wx 2.8 and 2.9.x
matplotlib.use('WX')
import pylab
pylab.plot(range(3), range(3), label="a")
pylab.show()
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
It might be that they are doing something which isn't the correct way to
do things, but happened to still work in the older versions, and now it
doesn't. If you can dig into the matplotlib code enough to make a
standalone sample that reproduces the problem then I'd be able to say
for sure one way or another.
--
Robin Dunn
Software Craftsman
http://wxPython.org
Thanks for the hint and sorry for the delayed answer.
Unfortunately, I wasn't able to find the offending part in matplotlib code.
The buggy display of the graph gui is well reproducible from the
sample in the initial post (especially the change between wx 2.9.1 and
2.9.2).
Furthermore, it seems, that the wx mode like the other "non Agg" ones
is kind of partly supported in matplotlib:
http://old.nabble.com/matplotlib-backends---WXAgg-vs.-WX-td32257741.html
Hence, I'll probably stick with the more official WXAgg backend in this context.
Regards,
vbr