A Python module for the libplot plotting library, part of the GNU plotutils package.
You'll need the following: (note that the rpms are for redhat-6.2/python-1.5.2)
For more information see the plotutils manual's section on libplot.
#!/usr/bin/env python import libplot import Numeric # defaults to X window plot pl = libplot.Plotter() pl.openpl() pl.erase() pl.fspace( -50, -50, 50, 50 ) # draw bounding box pl.box( -50, -50, 50, 50 ) x = Numeric.arange( -40, 40, 0.5 ) y = Numeric.sin(x/6) * 30 def plot_curve( pl, x, y ): pl.fmove( x[0], y[0] ) for i in range( 1, len(x) ): pl.fcont( x[i], y[i] ) # draw red sine wave pl.pencolorname( "red" ) plot_curve( pl, x, y ) pl.closepl() |
( home : last modified Oct 12 2001 ) |