Package asap :: Module asaplotgui_gtk :: Class asaplotgui
[show private | hide private]
[frames | no frames]

Class asaplotgui

asaplotbase --+
              |
             asaplotgui


ASAP plotting class based on matplotlib.
Method Summary
  __init__(self, rows, cols, title, size, buffering)
Create a new instance of the ASAPlot plotting class.
  map(self)
Reveal the ASAPlot graphics window and bring it to the top of the window stack.
  position(self)
Use the mouse to get a position from a graph.
  quit(self)
Destroy the ASAPlot graphics window.
  region(self)
Use the mouse to get a rectangular region from a plot.
  register(self, type, func)
Register, reregister, or deregister events of type 'button_press', 'button_release', or 'motion_notify'.
  show(self, hardrefresh)
Show graphics dependent on the current buffering state.
  terminate(self)
Clear the figure.
  unmap(self)
Hide the ASAPlot graphics window.
Inherited from asaplotbase: clear, delete, get_line, hist, hold, legend, palette, plot, release, save, set_axes, set_figure, set_limits, set_line, set_panels, set_title, subplot, text, tidy, vline_with_label

Method Details

__init__(self, rows=1, cols=0, title='', size=(8, 6), buffering=False)
(Constructor)

Create a new instance of the ASAPlot plotting class.

If rows < 1 then a separate call to set_panels() is required to define the panel layout; refer to the doctext for set_panels().
Overrides:
asap.asaplotbase.asaplotbase.__init__

map(self)

Reveal the ASAPlot graphics window and bring it to the top of the window stack.

position(self)

Use the mouse to get a position from a graph.
Overrides:
asap.asaplotbase.asaplotbase.position

quit(self)

Destroy the ASAPlot graphics window.

region(self)

Use the mouse to get a rectangular region from a plot.

The return value is [x0, y0, x1, y1] in world coordinates.
Overrides:
asap.asaplotbase.asaplotbase.region

register(self, type=None, func=None)

Register, reregister, or deregister events of type 'button_press',
'button_release', or 'motion_notify'.

The specified callback function should have the following signature:

    def func(event)

where event is an MplEvent instance containing the following data:

    name                # Event name.
    canvas              # FigureCanvas instance generating the event.
    x      = None       # x position - pixels from left of canvas.
    y      = None       # y position - pixels from bottom of canvas.
    button = None       # Button pressed: None, 1, 2, 3.
    key    = None       # Key pressed: None, chr(range(255)), shift,
                          win, or control
    inaxes = None       # Axes instance if cursor within axes.
    xdata  = None       # x world coordinate.
    ydata  = None       # y world coordinate.

For example:

    def mouse_move(event):
        print event.xdata, event.ydata

    a = asaplot()
    a.register('motion_notify', mouse_move)

If func is None, the event is deregistered.

Note that in TkAgg keyboard button presses don't generate an event.
Overrides:
asap.asaplotbase.asaplotbase.register

show(self, hardrefresh=True)

Show graphics dependent on the current buffering state.
Overrides:
asap.asaplotbase.asaplotbase.show

terminate(self)

Clear the figure.

unmap(self)

Hide the ASAPlot graphics window.

Generated by Epydoc 2.1 on Wed May 2 14:24:33 2007 http://epydoc.sf.net