--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Did you comment the ‘wxagg’ lines and un-comment the ‘wx’ lines at
the beginning of the sample?
The ‘wxagg’ backend works for me but the ‘wx’ only shows an empty
screen/canvas instead of showing the line graph.
Anyhow, thanks for testing.
Werner
Did you comment the 'wxagg' lines and un-comment the 'wx' lines at the
beginning of the sample?
The 'wxagg' backend works for me but the 'wx' only shows an empty
screen/canvas instead of showing the line graph.
Hi Werner. No, sorry, I overlooked that instruction in the email thread
above, and tried it now, and yes, I am seeing the same thing as you now.
The canvas area just shows whatever other windows on the screen were under
that window when it was first painted.
Do you specifically want to use the wx backend as opposed to the wxagg one,
or are you just bringing the breakage with this backend/upgrade to the
community's attention? I ask because I never know if one is preferred to
the other, though I assumed agg always is?
I personally only use the ‘wxagg’ backend, but as I worked on a PR
() for MPL 1.4 to
get it to be compatible with Phoenix I run into the problem when I
was testing stuff. Initially I thought I messed something up but
then I noticed that the problem existed already with MPL 1.3, but
wanted to see if I could find a fix for it. One MPL user reported
on the PR that it works for him on OSX, so it looks like a Windows
only issue.
Werner
···
Hi Che,
On 9/1/2014 23:19, C M wrote:
I ran the example and it shows the plot
fine.
Did you comment the 'wxagg' lines and un-comment the
‘wx’ lines at the beginning of the sample?
The 'wxagg' backend works for me but the 'wx' only shows
an empty screen/canvas instead of showing the line
graph.
Hi Werner. No, sorry, I overlooked that instruction in
the email thread above, and tried it now, and yes, I am
seeing the same thing as you now. The canvas area just
shows whatever other windows on the screen were under that
window when it was first painted.
Do you specifically want to use the wx backend as
opposed to the wxagg one, or are you just bringing the
breakage with this backend/upgrade to the community’s
attention? I ask because I never know if one is preferred
to the other, though I assumed agg always is?
For me, the problem appeared between
wxPython 2.9.1.1 and 2.9.2.1 (in that time with py 2.7.2, MPL 1.0.1,
using win 7);
(it's maybe interesting, that the earlier version of 2.9 appeared to work ok).
The problems were be solved/worked around by using WXAgg instead of
WX, as has been mentioned in this thread already.
regards,
vbr
···
2014-08-29 18:04 GMT+02:00 Werner <wernerfbd@gmx.ch>:
Hi,
I noticed that something broke the backend_wx as of the 2.9 series.
When using e.g. the mpl.examples.embedded_in_wx2.py it works correctly in
2.8.12 but in 2.9.5 an empty canvas is shown and no error.
The problem shows on Windows but things work on a Mac (as reported by
another user of MPL).
Has something changed in 2.9+ which affects the way one uses e.g.
GraphicsContext, PaintDC and friends - my current suspects.
For me, the problem appeared between
wxPython 2.9.1.1 and 2.9.2.1 (in that time with py 2.7.2, MPL 1.0.1,
using win 7);
(it's maybe interesting, that the earlier version of 2.9 appeared to work ok).
Thanks for the links.
The problems were be solved/worked around by using WXAgg instead of
WX, as has been mentioned in this thread already.
If I read the code correctly then the big difference in the wxAgg vs wx backend is that the later uses a wx.MemoryDC and wx.GraphicsContext, and then draws to the screen using a wx.PaintDC, where wxAgg converts the agg buffer to a Bitmap which is then drawn using the wx.PaintDC.
The strange thing is that the bitmap is correct, as I can save it to a file using the following in mpl.backend_wx.gui_repaint:
self.bitmap.SaveFile('mplimage.png', wx.BITMAP_TYPE_PNG)
just before the call to 'drawDC.DrawBitmap'
Werner
···
On 9/2/2014 11:49, Vlastimil Brom wrote:
2014-08-29 18:04 GMT+02:00 Werner <wernerfbd@gmx.ch>: