| |
- BltConfigureAxis
- BltConfigureElement
- BltConfigureGraph
- BltConfigureGrid
- BltConfigureLegend
- BltConfigureMarker
- BltPlot
- BltPrintSetup
- BltSettings
class BltConfigureAxis |
|
Creates a GUI window to configure an axis of a Pmw.Blt.Graph object. |
|
Methods defined here:
- __init__(self, graph, axis, command=None)
- Inputs:
graph:
A Pmw.Blt.Graph instance
axis:
The name of the axis, e.g. 'x', 'y', 'x2', 'y2'
command:
An optional callback function that will be called each time the
legend is modified. The callback will be called as:
command(axis)
- commands(self, button)
- Private method
Data and non-method functions defined here:
- __doc__ = '\n Creates a GUI window to configure an axis of a Pmw.Blt.Graph object.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BltConfigureElement |
|
Creates a GUI window to configure an "element" in a Pmw.Blt.Graph object. |
|
Methods defined here:
- __init__(self, graph, element, command=None)
- Inputs:
graph:
A Pmw.Blt.Graph instance
element:
The name of the element to configure.
command:
An optional callback function that will be called each time the
element is modified. The callback will be called as:
command(element)
- commands(self, button)
- Private method
Data and non-method functions defined here:
- __doc__ = '\n Creates a GUI window to configure an "element" in a Pmw.Blt.Graph object.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BltConfigureGraph |
|
Creates a GUI window to configure the primary graph attributes in a
Pmw.Blt.Graph object. The attributes include the background colors, title
font, relief, etc. |
|
Methods defined here:
- __init__(self, graph, command=None)
- Inputs:
graph:
A Pmw.Blt.Graph instance
command:
An optional callback function that will be called each time the
graph attributes are modified. The callback will be called as:
command()
- commands(self, button)
- Private method
Data and non-method functions defined here:
- __doc__ = '\n Creates a GUI window to configure the primar...ackground colors, title\n font, relief, etc.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BltConfigureGrid |
|
Creates a GUI window to configure the grid attributes in a Pmw.Blt.Graph
object. |
|
Methods defined here:
- __init__(self, graph, command=None)
- Inputs:
graph:
A Pmw.Blt.Graph instance
command:
An optional callback function that will be called each time the
grid is modified. The callback will be called as:
command()
- commands(self, button)
- Private method
Data and non-method functions defined here:
- __doc__ = '\n Creates a GUI window to configure the grid attributes in a Pmw.Blt.Graph\n object.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BltConfigureLegend |
|
Creates a GUI window to configure the legend of a Pmw.Blt.Graph object. |
|
Methods defined here:
- __init__(self, graph, command=None)
- Inputs:
graph:
A Pmw.Blt.Graph instance
command:
An optional callback function that will be called each time the
legend is modified. The callback will be called as:
command()
- commands(self, button)
- Private method
Data and non-method functions defined here:
- __doc__ = '\n Creates a GUI window to configure the legend of a Pmw.Blt.Graph object.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BltConfigureMarker |
|
Creates a GUI window to configure one or more markers in a Pmw.Blt.Graph object. |
|
Methods defined here:
- __init__(self, graph, marker, command=None)
- Inputs:
graph:
A Pmw.Blt.Graph instance
marker:
The name of the marker to configure. The marker name can contain
wildcards, in which case all markers matching the pattern will be
modified. Only the name of the first marker will be displayed in
the window.
command:
An optional callback function that will be called each time the
marker is modified. The callback will be called as:
command(marker)
- commands(self, button)
- Private method
Data and non-method functions defined here:
- __doc__ = '\n Creates a GUI window to configure one or more markers in a Pmw.Blt.Graph object.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BltPlot |
|
This class is used to build a standdalone plotting widget. It is designed
to provide a rough emulation of the command line plotting capabilities of
IDL.
This widget has menus to:
- Configure all of the plot characteristics
- Save and restore the plot settings and data
- Print the plot to a file or printer
The configuration menus can also be accessed by double-clicking on the
appropriate location of the plot, for example on the X axis.
The only "public" functions are the constuctor (__init__) and the plot and
oplot functions.
The following example creates a plot of sin(x) and cos(x) with a legend:
>>> from BltPlot import *
>>> import Numeric
>>> x = Numeric.arange(1000)/100.
>>> y1 = Numeric.sin(x)
>>> y2 = Numeric.cos(x)
>>> p = BltPlot(x, y1, label='sin(x)', legend=1)
>>> p.oplot(x, y2, label='cos(x)') |
|
Methods defined here:
- __init__(self, xdata=None, ydata=None, exit_callback=None, **kw)
- Creates a new plot widget. After the plot widget is created it invokes
the plot() function. It accepts all of the parameters and keywords
of the plot() function.
It takes the following addtional keyword:
exit_callback:
This is an optional function that will be called when the BltPlot
instance is destroyed. The callback function will be called as:
exit_callback(graph)
where graph is the Pmw.Blt.Graph instance.
- double_click(self, event)
- Private method
- element_mouse(self, event, element)
- Private method
- exit(self)
- Private method
- legend_mouse(self, event)
- Private method
- menu_restore(self)
- Private method
- menu_save(self)
- Private method
- menu_save_as(self)
- Private method
- oplot(self, xdata=None, ydata=None, symbol='', linewidth=1, pixels=7, smooth='linear', color='black', label='line2')
- Plots an additional element on the existing plot, i.e. does not delete
any existing elements in the graph.
Inputs:
Same as plot, described above.
Keywords:
Accepts a subset of the keywords used by plot(), described above.
symbol: The plot symbol, e.g. 'circle', 'square'.
Default is no symbol.
linewidth: The width of the lines connecting the data points
pixels: The size of the plot symbols in pixels.
smooth: The smoothing algorithm for the line seqments
connecting data points.
color: The color of the plot symbols and line seqments.
label: A label for this graph element. This is the string
that will appear in the legend and which is used
to configure this graph element.
- plot(self, xdata, ydata=None, window_title='BltPlot', title=None, background='light grey', plotbackground='white', xmin='', xmax='', xtitle=None, xlog=0, xtickfont=('Helvetica', '10'), xtitlefont=('Helvetica', '11', 'bold'), ymin='', ymax='', ytitle=None, ylog=0, ytickfont=('Helvetica', '10'), ytitlefont=('Helvetica', '11', 'bold'), symbol='', linewidth=1, pixels=7, smooth='linear', color='black', label='line1', legend=0)
- Creates a new plot, i.e. deletes any existing elements in the graph and
adds the new data element.
Inputs:
xdata:
A sequence (e.g. array, list, tuple) of the X axis coordinates of
the data to be plotted.
If xdata is input but ydata is not, then xdata are copied to ydata,
i.e. xdata are the Y values. In this case the X values are created
as a simple sequence with xdata = tuple(range(len(ydata))).
Pmw.Blt.Graph requires the xdata and ydata sequences to be tuples, so
it is most efficient to pass them this way. They will be
converted to tuples if they are another type.
ydata:
A sequence (e.g. array, list, tuple) of the Y axis coordinates of
the data to be plotted.
Keywords:
Most of the following keywords are simply the names of Pmw.Blt.Graph
configuration parameters. The user should consult the Pmw.Blt.Graph
documentation for details.
window_title: The title in the title bar of the window.
title: The title of the graph, placed just above the graph
background: The color of the window background
plotbackground: The color of the plot background
xmin: The minimum X value. Default is auto-scale.
xmax: The maximum X value. Default is auto-scale.
xtitle: The title of the X axis.
xlog: 1 for log scale, 0 for linear scale.
xtickfont: The font for the X axis tick labels
xtitlefont: The font for the X axis title
ymin: The minimum Y value. Default is auto-scale.
ymax: The maximum Y value. Default is auto-scale.
ytitle: The title of the Y axis.
ylog: 1 for log scale, 0 for linear scale.
ytickfont: The font for the Y axis tick labels
ytitlefont: The font for the Y axis title
symbol: The plot symbol, e.g. 'circle', 'square'.
Default is no symbol.
linewidth: The width of the lines connecting the data points
pixels: The size of the plot symbols in pixels.
smooth: The smoothing algorithm for the line seqments
connecting data points.
color: The color of the plot symbols and line seqments.
label: A label for this graph element. This is the string
that will appear in the legend and which is used
to configure this graph element. Default='line1'.
legend: 1=show legend, 0=hide legend.
- rebuild_menus(self)
- Private method
Data and non-method functions defined here:
- __doc__ = "\n This class is used to build a standdalone pl...gend=1)\n >>> p.oplot(x, y2, label='cos(x)')\n "
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BltPrintSetup |
|
Creates a GUI window to configure the printing parameters of a Pmw.Blt.Graph
object. |
|
Methods defined here:
- __init__(self, graph, command=None)
- Inputs:
graph:
A Pmw.Blt.Graph instance
command:
An optional callback function that will be called each time the
printing parameters are modified. The callback will be called as:
command()
- commands(self, button)
- Private method
Data and non-method functions defined here:
- __doc__ = '\n Creates a GUI window to configure the printing parameters of a Pmw.Blt.Graph\n object.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BltSettings |
|
Class used for saving and restoring settings. |
|
Methods defined here:
- __init__(self)
- ########################################################################
Data and non-method functions defined here:
- __doc__ = '\n Class used for saving and restoring settings.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'BltPlot'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
| |