Package PyFoam :: Package ThirdParty :: Package Gnuplot :: Module gp_java :: Class GnuplotProcess
[hide private]
[frames] | no frames]

Class GnuplotProcess

source code

Unsophisticated interface to a running gnuplot program.

This represents a running gnuplot program and the means to
communicate with it at a primitive level (i.e., pass it commands
or data).  When the object is destroyed, the gnuplot program exits
(unless the 'persist' option was set).  The communication is
one-way; gnuplot's text output just goes to stdout with no attempt
to check it for error messages.

Members:


Methods:

    '__init__' -- start up the program.

    '__call__' -- pass an arbitrary string to the gnuplot program,
        followed by a newline.

    'write' -- pass an arbitrary string to the gnuplot program.

    'flush' -- cause pending output to be written immediately.

Instance Methods [hide private]
 
__init__(self, persist=None)
Start a gnuplot process.
source code
 
close(self) source code
 
__del__(self) source code
 
write(self, s) source code
 
flush(self) source code
 
__call__(self, s)
Send a command string to gnuplot, followed by newline.
source code
Method Details [hide private]

__init__(self, persist=None)
(Constructor)

source code 
Start a gnuplot process.

Create a 'GnuplotProcess' object.  This starts a gnuplot
program and prepares to write commands to it.

Keyword arguments:

  'persist=1' -- start gnuplot with the '-persist' option,
      (which leaves the plot window on the screen even after
      the gnuplot program ends, and creates a new plot window
      each time the terminal type is set to 'x11').  This
      option is not available on older versions of gnuplot.