Package PyFoam :: Package ThirdParty :: Package Gnuplot :: Module PlotItems :: Class Func
[hide private]
[frames] | no frames]

Class Func

source code


Represents a mathematical expression to plot.

Func represents a mathematical expression that is to be computed by gnuplot itself, as if you would type for example:

   gnuplot> plot sin(x)

into gnuplot itself. The argument to the contructor is a string that should be a mathematical expression. Example:

   g.plot(Func('sin(x)', with_='line 3'))

As shorthand, a string passed to the plot method of a Gnuplot object is also treated as a Func:

   g.plot('sin(x)')
Instance Methods [hide private]
 
__init__(self, function, **keyw)
Construct a 'PlotItem'.
source code
 
get_base_command_string(self) source code
    Inherited from PlotItem
 
clear_option(self, name)
Clear (unset) a plot option.
source code
 
command(self)
Build the plot command to be sent to gnuplot.
source code
 
get_command_option_string(self) source code
 
get_option(self, name)
Return the setting of an option.
source code
 
pipein(self, f)
Pipe necessary inline data to gnuplot.
source code
 
set_option(self, **keyw)
Set or change a plot option for this PlotItem.
source code
 
set_string_option(self, option, value, default, fmt)
Set an option that takes a string value.
source code
Class Variables [hide private]
    Inherited from PlotItem
  _option_list = {'axes': <function <lambda> at 0x1108fc578>, 't...
  _option_sequence = ['binary', 'index', 'every', 'thru', 'using...
Method Details [hide private]

__init__(self, function, **keyw)
(Constructor)

source code 
Construct a 'PlotItem'.

Keyword options:

  'with_=<string>' -- choose how item will be plotted, e.g.,
      with_='points 3 3'.

  'title=<string>' -- set the title to be associated with the item
      in the plot legend.

  'title=None' -- choose 'notitle' option (omit item from legend).

Note that omitting the title option is different than setting
'title=None'; the former chooses gnuplot's default whereas the
latter chooses 'notitle'.

Overrides: PlotItem.__init__
(inherited documentation)

get_base_command_string(self)

source code 
Overrides: PlotItem.get_base_command_string