[matplotlib-devel] where's draw_point gone ?
Hi, in matplotlib 0.91 there was a function draw_point for the backends. This seems to be gone (except for backend_agg2.py and backend_emf.py !?). I guess it wasn't used very often; instead I see that there is now a function draw_point in lines.py. Is it possible to re-add this functionality to the backends ??? What I would need is a function that draws a single pixel to a device. The reason why I'm asking is that I have thought about an additional scatter marker m=(0,0) that draws single pixels (as fast as possible). Such a marker might be very useful when drawing lots and lots of data-point on in a single plot. A typical application might be to draw the positions of particles in an N-Body simulation. My current best approach is to use "scatter(x,y, s=0.1)", but I think that an optimized routine would be very helpful. So my main questions are: - Why was draw_point removed ? - Can it be re-added again? Manuel - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] where's draw_point gone ?
On Thu, Apr 3, 2008 at 8:40 AM, Manuel Metz <[EMAIL PROTECTED]> wrote: > Hi, > > in matplotlib 0.91 there was a function draw_point for the backends. > This seems to be gone (except for backend_agg2.py and backend_emf.py > !?). I guess it wasn't used very often; instead I see that there is now > a function draw_point in lines.py. Is it possible to re-add this > functionality to the backends ??? What I would need is a function that > draws a single pixel to a device. The markerstyle for drawing a pixel is ',' and it is supported across backends AFAIK In [1]: plot(rand(1000), ',') Out[1]: [] In [2]: savefig('test.png') In [3]: savefig('test.pdf') In [4]: savefig('test.eps') In [5]: savefig('test.svg') JDH - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
[matplotlib-devel] Problem in qtagg and qt4agg backends
A few weeks ago I reported a double draw problem in the qt backends. They both have a draw() method that looked like this: def draw( self ): self.replot = True FigureCanvasAgg.draw(self) self.repaint( False ) It turned out that FCA::draw() and self.repaint() both did a draw which slowed everything down. Commenting out the FCA draw call seemed to work fine: def draw( self ): self.replot = True self.repaint( False ) However, this breaks when running code like this: import pylab as p p.plot( [1,2,3] ) p.savefig( 'image.png' ) The image is never drawn in this case. If you do a show() and save the image from the gui, then everything is fine. I did some experimenting and the solution may be to do this: def draw( self ): self.replot = True FigureCanvasAgg.draw(self) Which does seem to work for the cases I have. Could someone else take a look and see if this doesn't break anything (You'll have to edit your local backends, I haven't changed anything). Ted - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel