Home | Trees | Indices | Help |
|
---|
|
A simple tool for plotting functions. Each new Plot
object opens a new window, containing the plot for a sinlge function.
See the documentation for Plot for information about creating new plots.
Plot sin(x) from -10 to 10, with a step of 0.1:
>>> Plot(math.sin)
Plot cos(x) from 0 to 2*pi, with a step of 0.01:
>>> Plot(math.cos, slice(0, 2*math.pi, 0.01))
Plot a list of points (connected by lines).
>>> points = ([1,1], [3,8], [5,3], [6,12], [1,24]) >>> Plot(points)
Plot a list of y-values (connected by lines). Each value[i] is plotted at x=i.
>>> values = [x**2 for x in range(200)] >>> Plot(values)
Plot a function with logarithmic axes.
>>> def f(x): return 5*x**2+2*x+8 >>> Plot(f, slice(1,10,.1), scale='log')
Plot the same function with semi-logarithmic axes.
>>> Plot(f, slice(1,10,.1), scale='log-linear') # logarithmic x; linear y >>> Plot(f, slice(1,10,.1), scale='linear-log') # linear x; logarithmic y
If BLT and PMW are both installed, then BLT is used to plot graphs. Otherwise, a simple Tkinter-based implementation is used. The Tkinter-based implementation does not display axis values.
|
|||
Plot A simple graphical tool for plotting functions. |
|||
Plot Frame Implementations | |||
---|---|---|---|
PlotFrameI A frame for plotting graphs. |
|||
CanvasPlotFrame | |||
BLTPlotFrame |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Aug 27 15:08:50 2008 | http://epydoc.sourceforge.net |