Module wxmpl :: Class PlotPanel

[frames] | no frames]

# Class PlotPanel

source code

                                     object --+
                                              |
      matplotlib.backend_bases.FigureCanvasBase --+
                                                  |
    matplotlib.backends.backend_agg.FigureCanvasAgg --+
                                                      |
                                     object --+       |
                                              |       |
      matplotlib.backend_bases.FigureCanvasBase --+   |
                                                  |   |
                                       wx.Panel --+   |
                                                  |   |
      matplotlib.backends.backend_wx.FigureCanvasWx --+
                                                      |
    matplotlib.backends.backend_wxagg.FigureCanvasWxAgg --+
                                                          |
                                                         PlotPanel

A matplotlib canvas suitable for embedding in wxPython applications.

Instance Methods

__init__(self, parent, id, size=(6.0,3.70), dpi=96, cursor=True, location=True, crosshairs=True, selection=True, zoom=True, autoscaleUnzoom=True) Creates a new PlotPanel window that is the child of the wxPython window `parent` with the wxPython identifier `id`. | source code

OnActivate(self, evt) Handles the wxPython window activation event. | source code

OnEraseBackground(self, evt) Overrides the wxPython backround repainting event to reduce flicker. | source code

OnDestroy(self, evt) Handles the wxPython window destruction event. | source code

get_figure(self) Returns the figure associated with this canvas. | source code

set_cursor(self, state) Enable or disable the changing mouse cursor. | source code

set_location(self, state) Enable or disable the display of the matplotlib axes coordinates of the mouse in the lower left corner of the canvas. | source code

set_crosshairs(self, state) Enable or disable drawing crosshairs through the mouse cursor when it is inside a matplotlib axes. | source code

set_selection(self, state) Enable or disable area selections, where user selects a rectangular area of the canvas by left-clicking and dragging the mouse. | source code

set_zoom(self, state) Enable or disable zooming in when the user makes an area selection and zooming out again when the user right-clicks. | source code

set_autoscale_unzoom(self, state) Enable or disable automatic view rescaling when the user zooms out to the initial figure. | source code

zoomed(self, axes) Returns a boolean indicating whether or not the `axes` is zoomed in. | source code

draw(self, **kwds) Draw the associated `Figure` onto the screen. | source code

notify_point(self, axes, x, y) Called by the associated `PlotPanelDirector` to emit a `PointEvent`. | source code

notify_selection(self, axes, x1, y1, x2, y2) Called by the associated `PlotPanelDirector` to emit a `SelectionEvent`. | source code

Inherited from `matplotlib.backends.backend_wxagg.FigureCanvasWxAgg`: `blit`, `print_figure`

Inherited from `matplotlib.backends.backend_agg.FigureCanvasAgg`: `buffer_rgba`, `copy_from_bbox`, `get_default_filetype`, `get_renderer`, `print_png`, `print_raw`, `print_rgba`, `print_to_buffer`, `restore_region`, `tostring_argb`, `tostring_rgb`

Inherited from `matplotlib.backends.backend_wx.FigureCanvasWx`: `Copy_to_Clipboard`, `Destroy`, `Printer_Init`, `Printer_Preview`, `Printer_Print`, `Printer_Setup`, `Printer_Setup2`, `draw_idle`, `flush_events`, `gui_repaint`, `new_timer`, `print_bmp`, `print_jpeg`, `print_jpg`, `print_pcx`, `print_tif`, `print_tiff`, `print_xpm`, `printerData`, `printerPageData`, `start_event_loop`, `stop_event_loop`

Inherited from `matplotlib.backend_bases.FigureCanvasBase`: `button_press_event`, `button_release_event`, `close_event`, `draw_cursor`, `draw_event`, `enter_notify_event`, `get_supported_filetypes`, `get_supported_filetypes_grouped`, `get_width_height`, `grab_mouse`, `idle_event`, `key_press_event`, `key_release_event`, `leave_notify_event`, `motion_notify_event`, `mpl_connect`, `mpl_disconnect`, `onHilite`, `onRemove`, `pick`, `pick_event`, `print_emf`, `print_eps`, `print_pdf`, `print_ps`, `print_rgb`, `print_svg`, `print_svgz`, `release_mouse`, `resize`, `resize_event`, `scroll_event`, `set_window_title`, `start_event_loop_default`, `stop_event_loop_default`, `switch_backends`

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables
Inherited from `matplotlib.backends.backend_wxagg.FigureCanvasWxAgg`: `filetypes` Inherited from `matplotlib.backends.backend_wx.FigureCanvasWx`: `keyvald` Inherited from `matplotlib.backend_bases.FigureCanvasBase`: `events`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, parent, id, size=(6.0,3.70), dpi=96, cursor=True, location=True, crosshairs=True, selection=True, zoom=True, autoscaleUnzoom=True)
(Constructor)

source code

Creates a new PlotPanel window that is the child of the wxPython window `parent` with the wxPython identifier `id`.

The keyword arguments `size` and {dpi} are used to create the matplotlib `Figure` associated with this canvas. `size` is the desired width and height of the figure, in inches, as the 2-tuple `(width, height)`. `dpi` is the dots-per-inch of the figure.

The keyword arguments `cursor`, `location`, `crosshairs`, `selection`, `zoom`, and `autoscaleUnzoom` enable or disable various user interaction features that are descibed in their associated `set()` methods.

Overrides: object.__init__

### set_cursor(self, state)

source code

Enable or disable the changing mouse cursor. When enabled, the cursor changes from the normal arrow to a square cross when the mouse enters a matplotlib axes on this canvas.

### draw(self, **kwds)

source code

Draw the associated `Figure` onto the screen.

Overrides: matplotlib.backend_bases.FigureCanvasBase.draw