FWIW: Matplotlib uses the older buffer interface because that is what
the older version of wx used (as well as other GUI toolkits). It would
be nice to move to the new memoryview objects, but all of the GUI
frameworks will need to move in tandem...
Mike
On 04/27/2013 06:23 PM, Werner F. Bruhin wrote:
Hi Michael,
On 26/04/2013 14:40, Michael Droettboom wrote:
On 04/26/2013 02:57 AM, Werner F. Bruhin wrote:
Hi,
Anyone can provide some info on what "agg.buffer_rgba" returns and
maybe
even some suggestion on how to resolve this issue in the wxagg backend.
It returns a Python buffer object on Python 2, though on Python 3 it is
a memoryview, since buffer was deprecated. Perhaps wx is also doing
something different depending on the version of Python.
As of Phoenix 2.9.5.81-r73873 matplot works with Phoenix, here is
Robin Dunn's comment to the change he did on Phoenix with regards to
the buffer handling.
Quote
The new buffer APIs go as far back as 2.6, IIRC, and the memoryview
and bytearray object types are available in 2.7 in addition to 3.x and
that I what I'm using in Phoenix. I would have expected MPL to do so
also since numpy is an integral part of MPL and the new buffer
interface was basically designed for and by numpy...
Anyway, while double checking all this I realized that it would not be
hard for me to accept old or new buffer objects for source buffers
(I'll still use memoryviews or bytearrays when on the producer side of
things) so try again after the next snapshot build. My unittests with
array.arrrays started working after the change so I expect that MPL's
rgba buffer should work too.
EndQuote
Enclosed is the patch for backend_wx.py and for embedding_in_wx5.py
which I used for testing, in the later I use wxversion.select to force
selection of a particular version - I think the distribution should
still just use ensureMinimal.
FYI, documentation for wxPython Phoenix are here:
http://wxpython.org/Phoenix/docs/html/index.html
And snapshots can be found here:
http://wxpython.org/Phoenix/snapshot-builds/
I tested only on Python 2.7.2 on Windows 7.
Werner
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users