Re: [Matplotlib-users] 2 newbie questions: redraw plot and access to raw image buffer

2007-10-29 Thread Michael Droettboom
And the harder question. I need access to the address of the raw image buffer. (I assume this is a contiguous block of c-allocated memory?) Presently, I copy into a ctypes buffer but this slows things down significantly. Is there an alternative approach? I'm assuming you're using the Agg

Re: [Matplotlib-users] 2 newbie questions: redraw plot and access to raw image buffer

2007-10-29 Thread Antonino Ingargiola
Hi, 2007/10/29, Darran Edmundson [EMAIL PROTECTED]: I'm trying to generate plots as textures for use within a real-time graphics application (written using the pythonOgre graphics engine). I'm brand new to matplotlib so please bear with me. Two questions, one easy, one possibly hard. In

Re: [Matplotlib-users] 2 newbie questions: redraw plot and access to raw image buffer

2007-10-29 Thread Darran Edmundson
Michael Droettboom wrote: I'm assuming you're using the Agg backend. If so, you can get the raw memory wrapped in a Python buffer object as follows: figureCanvas.get_renderer().buffer_rgba(x, y) (where x, y is the upper left corner in the plot of the area you want to get.) It should be