Package sage :: Package interfaces :: Module gnuplot :: Class Gnuplot
[hide private]
[frames] | no frames]

Class Gnuplot

source code

                      object --+    
                               |    
structure.sage_object.SageObject --+
                                   |
                                  Gnuplot


Interface to the Gnuplot interpreter.



Instance Methods [hide private]
 
_quit_string(self) source code
 
gnuplot(self) source code
 
__call__(self, line) source code
 
_eval_line(self, line, *args, **kwds) source code
 
__repr__(self)
File: sage/structure/sage_object.pyx (starting at line 86)
source code
 
plot(self, cmd, file=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., verbose=True, reset=True)
Draw the plot described by cmd, and possibly also save to an eps or png file.
source code
 
plot3d(self, f, xmin=-1, xmax=1, ymin=-1, ymax=1, zmin=-1, zmax=1, title=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., samples=25, isosamples=20, xlabel='x', ylabel='y', interact=True) source code
 
plot3d_parametric(self, f='cos(u)*(3 + v*cos(u/2)), sin(u)*(3 + v*cos(u/2)), v*sin(u/2)', range1='[u=-pi:pi]', range2='[v=-0.2:0.2]', samples=50, title=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., interact=True)
Draw a parametric 3d surface and rotate it interactively.
source code
 
interact(self, cmd) source code
 
console(self) source code

Inherited from structure.sage_object.SageObject: __hash__, __new__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, category, db, dump, dumps, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __init__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__repr__(self)
(Representation operator)

source code 
File: sage/structure/sage_object.pyx (starting at line 86)

Overrides: structure.sage_object.SageObject.__repr__
(inherited documentation)

plot(self, cmd, file=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., verbose=True, reset=True)

source code 

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{\code{\^}'s are replaced by **'s before being passed to gnuplot.}

Overrides: structure.sage_object.SageObject.plot

plot3d_parametric(self, f='cos(u)*(3 + v*cos(u/2)), sin(u)*(3 + v*cos(u/2)), v*sin(u/2)', range1='[u=-pi:pi]', range2='[v=-0.2:0.2]', samples=50, title=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., interact=True)

source code 

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.

EXAMPLES:
    sage: gnuplot.plot3d_parametric('v^2*sin(u), v*cos(u), v*(1-v)')   # optional -- requires gnuplot  (not tested, since something pops up).