Module wxmpl :: Class PlotFrame

[frames] | no frames]

# Class PlotFrame

source code

    wx.Frame --+
               |
              PlotFrame

A matplotlib canvas embedded in a wxPython top-level window.

Instance Methods

__init__(self, parent, id, title, size=(6.0,3.7), dpi=96, cursor=True, location=True, crosshairs=True, selection=True, zoom=True, autoscaleUnzoom=True, **kwds) Creates a new PlotFrame top-level window that is the child of the wxPython window `parent` with the wxPython identifier `id` and the title of `title`. | source code

create_menus(self) | source code

OnMenuFileSave(self, evt) Handles File->Save menu events. | source code

OnMenuFilePageSetup(self, evt) Handles File->Page Setup menu events | source code

OnMenuFilePrintPreview(self, evt) Handles File->Print Preview menu events | source code

OnMenuFilePrint(self, evt) Handles File->Print menu events | source code

OnMenuFileClose(self, evt) Handles File->Close menu events. | source code

OnMenuHelpAbout(self, evt) Handles Help->About menu events. | 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

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

Class Variables
| ABOUT_TITLE = `'About wxmpl.PlotFrame'` Title of the "About" dialog.
| ABOUT_MESSAGE = `'wxmpl.PlotFrame %s\n' % __version__+ 'Written`...`` Contents of the "About" dialog.

Method Details

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

source code

Creates a new PlotFrame top-level window that is the child of the wxPython window `parent` with the wxPython identifier `id` and the title of `title`.

All of the named keyword arguments to this constructor have the same meaning as those arguments to the constructor of `PlotPanel`.

Any additional keyword arguments are passed to the constructor of `wx.Frame`.

### 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.

Class Variable Details

### ABOUT_MESSAGE

Contents of the "About" dialog.

Value:

      'wxmpl.PlotFrame %s\n' % __version__+ 'Written by Ken McIvor <mcivor@i
      it.edu>\n'+ 'Copyright 2005-2009 Illinois Institute of Technology'