Best way to use Python to make 2d XY scatter graphs? Will TKinter do it?

John Hunter jdhunter at ace.bsd.uchicago.edu
Wed Oct 22 08:48:43 EDT 2003


>>>>> "rhmd" == rhmd  <rh4170056 at juno.com> writes:

    rhmd> I need to create image files (eg bmp or jpeg) of xy scatter
    rhmd> graphs (i.e., graphs in which markers denote individual
    rhmd> points; the markers need to be small polygons of various
    rhmd> sizes, shapes, colors, shadings, etc. and there are
    rhmd> thousands on them on each graph).  

matplotlib makes x-y scatter plots with circles of arbitrary size and
color

    from matplotlib.matlab import *
    
    ... x, y, size, and color are Numeric arrays ...
    scatter(x, y, size, color)
    show()

It doesn't (yet) support polygons, but this would be easy to add (I'm
putting it on my TODO list) -- http://matplotlib.sourceforge.net.  It
has the added benefit of interactive rescaling of axes with GUI
widgets, a postscript output, and more!

JDH





More information about the Python-list mailing list