[SciPy-user] Plotting in matplotlib (was:What is missing inscipy to be a top notch environment for signal processing)

Johannes Loehnert a.u.r.e.l.i.a.n at gmx.net
Tue Nov 21 03:16:45 CST 2006


Hi,

> Thanks for that idea. I would like to see that class of yours...

Here it is. :-) It is not really well tested (it is merely a side-product of 
my work), but documentation and common sense should be sufficient to fix 
errors. In particular, Canvas.plot_interpolate might need fixing -- I don't 
use it since it is 4x slower than Canvas.plot.

usage example:

from pylab import *
from image_plotter import Canvas, MODE_AVG
# instantiate:
plotter = Canvas(800, 600, mode=MODE_AVG)
plotter.limits((0, 2*pi, -1, 1))
# plot some data (supply yourself)
plotter.plot(x, y, (128,0,0))   # last tuple is color
# show
imshow(plotter.image(), interpolation='nearest')
plotter.save('test.bmp')


Best regards, Johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image_plotter.py
Type: application/x-python
Size: 5865 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20061121/5489af30/attachment.bin 


More information about the SciPy-user mailing list