4.4 Interface to the Gnuplot interpreter

Module: sage.interfaces.gnuplot

Module-level Functions

gnuplot_console( )

Class: Gnuplot

class Gnuplot
Interface to the Gnuplot interpreter.

Functions: console,$  $ gnuplot,$  $ interact,$  $ plot,$  $ plot3d,$  $ plot3d_parametric

plot( self, cmd, [file=True], [verbose=True], [reset=None])

Draw the plot described by cmd, and possibly also save to an eps or png file.

INPUT:
    cmd -- string
    file -- string (default: None), if specified save plot to given file,
            which may be either an eps (default) or png file.
    verbose -- print some info
    reset -- True: reset gnuplot before making graph
    
OUTPUT:
    displays graph

Note: ^'s are replaced by **'s before being passed to gnuplot.

plot3d_parametric( self, [f=True], [range1=None], [range2=50], [samples=[v=-0.2:0.2]], [title=[u=-pi:pi]], [interact=cos(u)*(3 + v*cos(u/2)), sin(u)*(3 + v*cos(u/2)), v*sin(u/2)])

Draw a parametric 3d surface and rotate it interactively.

INPUT:
     f -- (string) a function of two variables, e.g., 
      'cos(u)*(3 + v*cos(u/2)), sin(u)*(3 + v*cos(u/2)), v*sin(u/2)'
     range1 -- (string) range of values for one variable, e.g., 
                '[u=-pi:pi]'
     range2 -- (string) range of values for another variable, e.g.,
                '[v=-0.2:0.2]'
     samples -- (int) number of sample points to use
     title   -- (string) title of the graph.

sage: gnuplot.plot3d_parametric('v^2*sin(u), v*cos(u), v*(1-v)')

Special Functions: __call__,$  $ __repr__,$  $ _eval_line,$  $ _quit_string

See About this document... for information on suggesting changes.