1019 lines (851 with data), 69.2 kB
@header@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="matplotlib.html"><font color="#ffffff">matplotlib</font></a>.backend_bases</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/backend_bases.py">/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/backend_bases.py</a></font></td></tr></table>
<p><tt>Abstract base classes define the primitives that renderers and<br>
graphics contexts must implement to serve as a matplotlib backend<br>
<br>
:class:`<a href="#RendererBase">RendererBase</a>`<br>
An abstract base class to handle drawing/rendering operations.<br>
<br>
:class:`<a href="#FigureCanvasBase">FigureCanvasBase</a>`<br>
The abstraction layer that separates the<br>
:class:`matplotlib.figure.Figure` from the backend specific<br>
details like a user interface drawing area<br>
<br>
:class:`<a href="#GraphicsContextBase">GraphicsContextBase</a>`<br>
An abstract base class that provides color, line styles, etc...<br>
<br>
:class:`<a href="#Event">Event</a>`<br>
The base class for all of the matplotlib event<br>
handling. Derived classes suh as :class:`<a href="#KeyEvent">KeyEvent</a>` and<br>
:class:`<a href="#MouseEvent">MouseEvent</a>` store the meta data like keys and buttons<br>
pressed, x and y locations in pixel and<br>
:class:`~matplotlib.axes.Axes` coordinates.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="matplotlib._image.html">matplotlib._image</a><br>
<a href="matplotlib.cbook.html">matplotlib.cbook</a><br>
<a href="matplotlib.colors.html">matplotlib.colors</a><br>
</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
<a href="os.html">os</a><br>
<a href="matplotlib.path.html">matplotlib.path</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
<a href="matplotlib.transforms.html">matplotlib.transforms</a><br>
<a href="warnings.html">warnings</a><br>
</td><td width="25%" valign=top><a href="matplotlib.widgets.html">matplotlib.widgets</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#Cursors">Cursors</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#Event">Event</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#DrawEvent">DrawEvent</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#IdleEvent">IdleEvent</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#LocationEvent">LocationEvent</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#KeyEvent">KeyEvent</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#MouseEvent">MouseEvent</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#PickEvent">PickEvent</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#ResizeEvent">ResizeEvent</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#FigureCanvasBase">FigureCanvasBase</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#FigureManagerBase">FigureManagerBase</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#GraphicsContextBase">GraphicsContextBase</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#NavigationToolbar2">NavigationToolbar2</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#RendererBase">RendererBase</a>
</font></dt></dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Cursors">class <strong>Cursors</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt># cursors<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Data and other attributes defined here:<br>
<dl><dt><strong>HAND</strong> = 0</dl>
<dl><dt><strong>MOVE</strong> = 3</dl>
<dl><dt><strong>POINTER</strong> = 1</dl>
<dl><dt><strong>SELECT_REGION</strong> = 2</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="DrawEvent">class <strong>DrawEvent</strong></a>(<a href="matplotlib.backend_bases.html#Event">Event</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An event triggered by a draw operation on the canvas<br>
<br>
In addition to the :class:`<a href="#Event">Event</a>` attributes, the following event attributes are defined:<br>
<br>
*renderer*<br>
the :class:`<a href="#RendererBase">RendererBase</a>` instance for the draw event<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="DrawEvent-__init__"><strong>__init__</strong></a>(self, name, canvas, renderer)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Event">class <strong>Event</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A matplotlib event. Attach additional attributes as defined in<br>
:meth:`<a href="#FigureCanvasBase">FigureCanvasBase</a>.mpl_connect`. The following attributes<br>
are defined and shown with their default values<br>
<br>
*name*<br>
the event name<br>
<br>
*canvas*<br>
the FigureCanvas instance generating the event<br>
<br>
*guiEvent*<br>
the GUI event that triggered the matplotlib event<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Event-__init__"><strong>__init__</strong></a>(self, name, canvas, guiEvent<font color="#909090">=None</font>)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="FigureCanvasBase">class <strong>FigureCanvasBase</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>The canvas the figure renders into.<br>
<br>
Public attributes<br>
<br>
*figure*<br>
A :class:`matplotlib.figure.Figure` instance<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FigureCanvasBase-__init__"><strong>__init__</strong></a>(self, figure)</dt></dl>
<dl><dt><a name="FigureCanvasBase-blit"><strong>blit</strong></a>(self, bbox<font color="#909090">=None</font>)</dt><dd><tt>blit the canvas in bbox (default entire canvas)</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-button_press_event"><strong>button_press_event</strong></a>(self, x, y, button, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>Backend derived classes should call this function on any mouse<br>
button press. x,y are the canvas coords: 0,0 is lower, left.<br>
button and key are as defined in :class:`<a href="#MouseEvent">MouseEvent</a>`.<br>
<br>
This method will be call all functions connected to the<br>
'button_press_event' with a :class:`<a href="#MouseEvent">MouseEvent</a>` instance.</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-button_release_event"><strong>button_release_event</strong></a>(self, x, y, button, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>Backend derived classes should call this function on any mouse<br>
button release.<br>
<br>
*x*<br>
the canvas coordinates where 0=left<br>
<br>
*y*<br>
the canvas coordinates where 0=bottom<br>
<br>
*guiEvent*<br>
the native UI event that generated the mpl event<br>
<br>
<br>
This method will be call all functions connected to the<br>
'button_release_event' with a :class:`<a href="#MouseEvent">MouseEvent</a>` instance.</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-draw"><strong>draw</strong></a>(self, *args, **kwargs)</dt><dd><tt>Render the :class:`~matplotlib.figure.Figure`</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-draw_cursor"><strong>draw_cursor</strong></a>(self, event)</dt><dd><tt>Draw a cursor in the event.axes if inaxes is not None. Use<br>
native GUI drawing for efficiency if possible</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-draw_event"><strong>draw_event</strong></a>(self, renderer)</dt><dd><tt>This method will be call all functions connected to the<br>
'draw_event' with a :class:`<a href="#DrawEvent">DrawEvent</a>`</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-draw_idle"><strong>draw_idle</strong></a>(self, *args, **kwargs)</dt><dd><tt>:meth:`draw` only if idle; defaults to draw but backends can overrride</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-flush_events"><strong>flush_events</strong></a>(self)</dt><dd><tt>Flush the GUI events for the figure. Implemented only for<br>
backends with GUIs.</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-get_default_filetype"><strong>get_default_filetype</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureCanvasBase-get_supported_filetypes"><strong>get_supported_filetypes</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureCanvasBase-get_supported_filetypes_grouped"><strong>get_supported_filetypes_grouped</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureCanvasBase-get_width_height"><strong>get_width_height</strong></a>(self)</dt><dd><tt>return the figure width and height in points or pixels<br>
(depending on the backend), truncated to integers</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-idle_event"><strong>idle_event</strong></a>(self, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>call when GUI is idle</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-key_press_event"><strong>key_press_event</strong></a>(self, key, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>This method will be call all functions connected to the<br>
'key_press_event' with a :class:`<a href="#KeyEvent">KeyEvent</a>`</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-key_release_event"><strong>key_release_event</strong></a>(self, key, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>This method will be call all functions connected to the<br>
'key_release_event' with a :class:`<a href="#KeyEvent">KeyEvent</a>`</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-motion_notify_event"><strong>motion_notify_event</strong></a>(self, x, y, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>Backend derived classes should call this function on any<br>
motion-notify-event.<br>
<br>
*x*<br>
the canvas coordinates where 0=left<br>
<br>
*y*<br>
the canvas coordinates where 0=bottom<br>
<br>
*guiEvent*<br>
the native UI event that generated the mpl event<br>
<br>
<br>
This method will be call all functions connected to the<br>
'motion_notify_event' with a :class:`<a href="#MouseEvent">MouseEvent</a>` instance.</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-mpl_connect"><strong>mpl_connect</strong></a>(self, s, func)</dt><dd><tt>Connect event with string *s* to *func*. The signature of *func* is::<br>
<br>
def func(event)<br>
<br>
where event is a :class:`matplotlib.backend_bases.<a href="#Event">Event</a>`. The<br>
following events are recognized<br>
<br>
- 'button_press_event'<br>
- 'button_release_event'<br>
- 'draw_event'<br>
- 'key_press_event'<br>
- 'key_release_event'<br>
- 'motion_notify_event'<br>
- 'pick_event'<br>
- 'resize_event'<br>
- 'scroll_event'<br>
<br>
For the location events (button and key press/release), if the<br>
mouse is over the axes, the variable ``event.inaxes`` will be<br>
set to the :class:`~matplotlib.axes.Axes` the event occurs is<br>
over, and additionally, the variables ``event.xdata`` and<br>
``event.ydata`` will be defined. This is the mouse location<br>
in data coords. See<br>
:class:`~matplotlib.backend_bases.<a href="#KeyEvent">KeyEvent</a>` and<br>
:class:`~matplotlib.backend_bases.<a href="#MouseEvent">MouseEvent</a>` for more info.<br>
<br>
Return value is a connection id that can be used with<br>
:meth:`~matplotlib.backend_bases.<a href="#Event">Event</a>.mpl_disconnect`.<br>
<br>
Example usage::<br>
<br>
def on_press(event):<br>
print 'you pressed', event.button, event.xdata, event.ydata<br>
<br>
cid = canvas.<a href="#FigureCanvasBase-mpl_connect">mpl_connect</a>('button_press_event', on_press)</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-mpl_disconnect"><strong>mpl_disconnect</strong></a>(self, cid)</dt><dd><tt>disconnect callback id cid<br>
<br>
Example usage::<br>
<br>
cid = canvas.<a href="#FigureCanvasBase-mpl_connect">mpl_connect</a>('button_press_event', on_press)<br>
#...later<br>
canvas.<a href="#FigureCanvasBase-mpl_disconnect">mpl_disconnect</a>(cid)</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-onHilite"><strong>onHilite</strong></a>(self, ev)</dt><dd><tt>Mouse event processor which highlights the artists<br>
under the cursor. Connect this to the 'motion_notify_event'<br>
using::<br>
<br>
canvas.<a href="#FigureCanvasBase-mpl_connect">mpl_connect</a>('motion_notify_event',canvas.onHilite)</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-onRemove"><strong>onRemove</strong></a>(self, ev)</dt><dd><tt>Mouse event processor which removes the top artist<br>
under the cursor. Connect this to the 'mouse_press_event'<br>
using::<br>
<br>
canvas.<a href="#FigureCanvasBase-mpl_connect">mpl_connect</a>('mouse_press_event',canvas.onRemove)</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-pick"><strong>pick</strong></a>(self, mouseevent)</dt></dl>
<dl><dt><a name="FigureCanvasBase-pick_event"><strong>pick_event</strong></a>(self, mouseevent, artist, **kwargs)</dt><dd><tt>This method will be called by artists who are picked and will<br>
fire off :class:`<a href="#PickEvent">PickEvent</a>` callbacks registered listeners</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-print_bmp"><strong>print_bmp</strong></a> = <a href="#FigureCanvasBase-print_raw">print_raw</a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_emf"><strong>print_emf</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_eps"><strong>print_eps</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_figure"><strong>print_figure</strong></a>(self, filename, dpi<font color="#909090">=None</font>, facecolor<font color="#909090">='w'</font>, edgecolor<font color="#909090">='w'</font>, orientation<font color="#909090">='portrait'</font>, format<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Render the figure to hardcopy. Set the figure patch face and edge<br>
colors. This is useful because some of the GUIs have a gray figure<br>
face color background and you'll probably want to override this on<br>
hardcopy.<br>
<br>
Arguments are:<br>
<br>
*filename*<br>
can also be a file object on image backends<br>
<br>
*orientation*<br>
only currently applies to PostScript printing.<br>
<br>
*dpi*<br>
the dots per inch to save the figure in; if None, use savefig.dpi<br>
<br>
*facecolor*<br>
the facecolor of the figure<br>
<br>
*edgecolor*<br>
the edgecolor of the figure<br>
<br>
*orientation* '<br>
landscape' | 'portrait' (not supported on all backends)<br>
<br>
*format*<br>
when set, forcibly set the file format to save to</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-print_pdf"><strong>print_pdf</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_png"><strong>print_png</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_ps"><strong>print_ps</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_raw"><strong>print_raw</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_rgb"><strong>print_rgb</strong></a> = <a href="#FigureCanvasBase-print_raw">print_raw</a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_svg"><strong>print_svg</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-print_svgz"><strong>print_svgz</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="FigureCanvasBase-resize"><strong>resize</strong></a>(self, w, h)</dt><dd><tt>set the canvas size in pixels</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-resize_event"><strong>resize_event</strong></a>(self)</dt><dd><tt>This method will be call all functions connected to the<br>
'resize_event' with a :class:`<a href="#ResizeEvent">ResizeEvent</a>`</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-scroll_event"><strong>scroll_event</strong></a>(self, x, y, step, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>Backend derived classes should call this function on any<br>
scroll wheel event. x,y are the canvas coords: 0,0 is lower,<br>
left. button and key are as defined in <a href="#MouseEvent">MouseEvent</a>.<br>
<br>
This method will be call all functions connected to the<br>
'scroll_event' with a :class:`<a href="#MouseEvent">MouseEvent</a>` instance.</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-set_window_title"><strong>set_window_title</strong></a>(self, title)</dt><dd><tt>Set the title text of the window containing the figure. Note that<br>
this has no effect if there is no window (eg, a PS backend).</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-start_event_loop"><strong>start_event_loop</strong></a>(self, timeout)</dt><dd><tt>Start an event loop. This is used to start a blocking event<br>
loop so that interactive functions, such as ginput and<br>
waitforbuttonpress, can wait for events. This should not be<br>
confused with the main GUI event loop, which is always running<br>
and has nothing to do with this.<br>
<br>
This is implemented only for backends with GUIs.</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-start_event_loop_default"><strong>start_event_loop_default</strong></a>(self, timeout<font color="#909090">=0</font>)</dt><dd><tt>Start an event loop. This is used to start a blocking event<br>
loop so that interactive functions, such as ginput and<br>
waitforbuttonpress, can wait for events. This should not be<br>
confused with the main GUI event loop, which is always running<br>
and has nothing to do with this.<br>
<br>
This function provides default event loop functionality based<br>
on time.sleep that is meant to be used until event loop<br>
functions for each of the GUI backends can be written. As<br>
such, it throws a deprecated warning.<br>
<br>
Call signature::<br>
<br>
<a href="#FigureCanvasBase-start_event_loop_default">start_event_loop_default</a>(self,timeout=0)<br>
<br>
This call blocks until a callback function triggers<br>
<a href="#FigureCanvasBase-stop_event_loop">stop_event_loop</a>() or *timeout* is reached. If *timeout* is<br>
<=0, never timeout.</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-stop_event_loop"><strong>stop_event_loop</strong></a>(self)</dt><dd><tt>Stop an event loop. This is used to stop a blocking event<br>
loop so that interactive functions, such as ginput and<br>
waitforbuttonpress, can wait for events.<br>
<br>
This is implemented only for backends with GUIs.</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-stop_event_loop_default"><strong>stop_event_loop_default</strong></a>(self)</dt><dd><tt>Stop an event loop. This is used to stop a blocking event<br>
loop so that interactive functions, such as ginput and<br>
waitforbuttonpress, can wait for events.<br>
<br>
Call signature::<br>
<br>
<a href="#FigureCanvasBase-stop_event_loop_default">stop_event_loop_default</a>(self)</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-switch_backends"><strong>switch_backends</strong></a>(self, FigureCanvasClass)</dt><dd><tt>instantiate an instance of FigureCanvasClass<br>
<br>
This is used for backend switching, eg, to instantiate a<br>
FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is<br>
not done, so any changes to one of the instances (eg, setting<br>
figure size or line props), will be reflected in the other</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>events</strong> = ['resize_event', 'draw_event', 'key_press_event', 'key_release_event', 'button_press_event', 'button_release_event', 'scroll_event', 'motion_notify_event', 'pick_event', 'idle_event']</dl>
<dl><dt><strong>filetypes</strong> = {'emf': 'Enhanced Metafile', 'eps': 'Encapsulated Postscript', 'pdf': 'Portable Document Format', 'png': 'Portable Network Graphics', 'ps': 'Postscript', 'raw': 'Raw RGBA bitmap', 'rgba': 'Raw RGBA bitmap', 'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics'}</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="FigureManagerBase">class <strong>FigureManagerBase</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Helper class for matlab mode, wraps everything up into a neat bundle<br>
<br>
Public attibutes:<br>
<br>
*canvas*<br>
A :class:`<a href="#FigureCanvasBase">FigureCanvasBase</a>` instance<br>
<br>
*num*<br>
The figure nuamber<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FigureManagerBase-__init__"><strong>__init__</strong></a>(self, canvas, num)</dt></dl>
<dl><dt><a name="FigureManagerBase-destroy"><strong>destroy</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureManagerBase-full_screen_toggle"><strong>full_screen_toggle</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureManagerBase-key_press"><strong>key_press</strong></a>(self, event)</dt></dl>
<dl><dt><a name="FigureManagerBase-resize"><strong>resize</strong></a>(self, w, h)</dt><dd><tt>For gui backends: resize window in pixels</tt></dd></dl>
<dl><dt><a name="FigureManagerBase-set_window_title"><strong>set_window_title</strong></a>(self, title)</dt><dd><tt>Set the title text of the window containing the figure. Note that<br>
this has no effect if there is no window (eg, a PS backend).</tt></dd></dl>
<dl><dt><a name="FigureManagerBase-show_popup"><strong>show_popup</strong></a>(self, msg)</dt><dd><tt>Display message in a popup -- GUI only</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="GraphicsContextBase">class <strong>GraphicsContextBase</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An abstract base class that provides color, line styles, etc...<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="GraphicsContextBase-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="GraphicsContextBase-copy_properties"><strong>copy_properties</strong></a>(self, gc)</dt><dd><tt>Copy properties from gc to self</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_alpha"><strong>get_alpha</strong></a>(self)</dt><dd><tt>Return the alpha value used for blending - not supported on<br>
all backends</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_antialiased"><strong>get_antialiased</strong></a>(self)</dt><dd><tt>Return true if the object should try to do antialiased rendering</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_capstyle"><strong>get_capstyle</strong></a>(self)</dt><dd><tt>Return the capstyle as a string in ('butt', 'round', 'projecting')</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_clip_path"><strong>get_clip_path</strong></a>(self)</dt><dd><tt>Return the clip path in the form (path, transform), where path<br>
is a :class:`~matplotlib.path.Path` instance, and transform is<br>
an affine transform to apply to the path before clipping.</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_clip_rectangle"><strong>get_clip_rectangle</strong></a>(self)</dt><dd><tt>Return the clip rectangle as a :class:`~matplotlib.transforms.Bbox` instance</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_dashes"><strong>get_dashes</strong></a>(self)</dt><dd><tt>Return the dash information as an offset dashlist tuple The<br>
dash list is a even size list that gives the ink on, ink off<br>
in pixels. See p107 of to postscript `BLUEBOOK<br>
<<a href="http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF>`_">http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF>`_</a><br>
for more info<br>
<br>
Default value is None</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_hatch"><strong>get_hatch</strong></a>(self)</dt><dd><tt>Gets the current hatch style</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_joinstyle"><strong>get_joinstyle</strong></a>(self)</dt><dd><tt>Return the line join style as one of ('miter', 'round', 'bevel')</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_linestyle"><strong>get_linestyle</strong></a>(self, style)</dt><dd><tt>Return the linestyle: one of ('solid', 'dashed', 'dashdot',<br>
'dotted').</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_linewidth"><strong>get_linewidth</strong></a>(self)</dt><dd><tt>Return the line width in points as a scalar</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-get_rgb"><strong>get_rgb</strong></a>(self)</dt><dd><tt>returns a tuple of three floats from 0-1. color can be a<br>
matlab format string, a html hex color string, or a rgb tuple</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_alpha"><strong>set_alpha</strong></a>(self, alpha)</dt><dd><tt>Set the alpha value used for blending - not supported on<br>
all backends</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_antialiased"><strong>set_antialiased</strong></a>(self, b)</dt><dd><tt>True if object should be drawn with antialiased rendering</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_capstyle"><strong>set_capstyle</strong></a>(self, cs)</dt><dd><tt>Set the capstyle as a string in ('butt', 'round', 'projecting')</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_clip_path"><strong>set_clip_path</strong></a>(self, path)</dt><dd><tt>Set the clip path and transformation. Path should be a<br>
:class:`~matplotlib.transforms.TransformedPath` instance.</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_clip_rectangle"><strong>set_clip_rectangle</strong></a>(self, rectangle)</dt><dd><tt>Set the clip rectangle with sequence (left, bottom, width, height)</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_dashes"><strong>set_dashes</strong></a>(self, dash_offset, dash_list)</dt><dd><tt>Set the dash style for the gc.<br>
<br>
*dash_offset*<br>
is the offset (usually 0).<br>
<br>
*dash_list*<br>
specifies the on-off sequence as points. ``(None, None)`` specifies a solid line</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_foreground"><strong>set_foreground</strong></a>(self, fg, isRGB<font color="#909090">=False</font>)</dt><dd><tt>Set the foreground color. fg can be a matlab format string, a<br>
html hex color string, an rgb unit tuple, or a float between 0<br>
and 1. In the latter case, grayscale is used.<br>
<br>
The :class:`<a href="#GraphicsContextBase">GraphicsContextBase</a>` converts colors to rgb<br>
internally. If you know the color is rgb already, you can set<br>
``isRGB=True`` to avoid the performace hit of the conversion</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_graylevel"><strong>set_graylevel</strong></a>(self, frac)</dt><dd><tt>Set the foreground color to be a gray level with *frac*</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_hatch"><strong>set_hatch</strong></a>(self, hatch)</dt><dd><tt>Sets the hatch style for filling</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_joinstyle"><strong>set_joinstyle</strong></a>(self, js)</dt><dd><tt>Set the join style to be one of ('miter', 'round', 'bevel')</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_linestyle"><strong>set_linestyle</strong></a>(self, style)</dt><dd><tt>Set the linestyle to be one of ('solid', 'dashed', 'dashdot',<br>
'dotted').</tt></dd></dl>
<dl><dt><a name="GraphicsContextBase-set_linewidth"><strong>set_linewidth</strong></a>(self, w)</dt><dd><tt>Set the linewidth in points</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>dashd</strong> = {'dashdot': (0, (3.0, 5.0, 1.0, 5.0)), 'dashed': (0, (6.0, 6.0)), 'dotted': (0, (1.0, 3.0)), 'solid': (None, None)}</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="IdleEvent">class <strong>IdleEvent</strong></a>(<a href="matplotlib.backend_bases.html#Event">Event</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An event triggered by the GUI backend when it is idle -- useful<br>
for passive animation<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods inherited from <a href="matplotlib.backend_bases.html#Event">Event</a>:<br>
<dl><dt><a name="IdleEvent-__init__"><strong>__init__</strong></a>(self, name, canvas, guiEvent<font color="#909090">=None</font>)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="KeyEvent">class <strong>KeyEvent</strong></a>(<a href="matplotlib.backend_bases.html#LocationEvent">LocationEvent</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A key event (key press, key release).<br>
<br>
Attach additional attributes as defined in<br>
:meth:`<a href="#FigureCanvasBase">FigureCanvasBase</a>.mpl_connect`.<br>
<br>
In addition to the :class:`<a href="#Event">Event</a>` and :class:`<a href="#LocationEvent">LocationEvent</a>`<br>
attributes, the following attributes are defined:<br>
<br>
*key*<br>
the key pressed: None, chr(range(255), shift, win, or control<br>
<br>
This interface may change slightly when better support for<br>
modifier keys is included.<br>
<br>
<br>
Example usage::<br>
<br>
def on_key(event):<br>
print 'you pressed', event.key, event.xdata, event.ydata<br>
<br>
cid = fig.canvas.mpl_connect('key_press_event', on_key)<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.backend_bases.html#KeyEvent">KeyEvent</a></dd>
<dd><a href="matplotlib.backend_bases.html#LocationEvent">LocationEvent</a></dd>
<dd><a href="matplotlib.backend_bases.html#Event">Event</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="KeyEvent-__init__"><strong>__init__</strong></a>(self, name, canvas, key, x<font color="#909090">=0</font>, y<font color="#909090">=0</font>, guiEvent<font color="#909090">=None</font>)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.backend_bases.html#LocationEvent">LocationEvent</a>:<br>
<dl><dt><strong>inaxes</strong> = None</dl>
<dl><dt><strong>x</strong> = None</dl>
<dl><dt><strong>xdata</strong> = None</dl>
<dl><dt><strong>y</strong> = None</dl>
<dl><dt><strong>ydata</strong> = None</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="LocationEvent">class <strong>LocationEvent</strong></a>(<a href="matplotlib.backend_bases.html#Event">Event</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A event that has a screen location<br>
<br>
The following additional attributes are defined and shown with<br>
their default values<br>
<br>
In addition to the :class:`<a href="#Event">Event</a>` attributes, the following event attributes are defined:<br>
<br>
*x*<br>
x position - pixels from left of canvas<br>
<br>
*y*<br>
y position - pixels from bottom of canvas<br>
<br>
*inaxes*<br>
the :class:`~matplotlib.axes.Axes` instance if mouse is over axes<br>
<br>
*xdata*<br>
x coord of mouse in data coords<br>
<br>
*ydata*<br>
y coord of mouse in data coords<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="LocationEvent-__init__"><strong>__init__</strong></a>(self, name, canvas, x, y, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>*x*, *y* in figure coords, 0,0 = bottom, left</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>inaxes</strong> = None</dl>
<dl><dt><strong>x</strong> = None</dl>
<dl><dt><strong>xdata</strong> = None</dl>
<dl><dt><strong>y</strong> = None</dl>
<dl><dt><strong>ydata</strong> = None</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="MouseEvent">class <strong>MouseEvent</strong></a>(<a href="matplotlib.backend_bases.html#LocationEvent">LocationEvent</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A mouse event ('button_press_event', 'button_release_event', 'scroll_event',<br>
'motion_notify_event').<br>
<br>
In addition to the :class:`<a href="#Event">Event</a>` and :class:`<a href="#LocationEvent">LocationEvent</a>`<br>
attributes, the following attributes are defined:<br>
<br>
*button*<br>
button pressed None, 1, 2, 3, 'up', 'down' (up and down are used for scroll events)<br>
<br>
*key*<br>
the key pressed: None, chr(range(255), 'shift', 'win', or 'control'<br>
<br>
*step*<br>
number of scroll steps (positive for 'up', negative for 'down')<br>
<br>
<br>
Example usage::<br>
<br>
def on_press(event):<br>
print 'you pressed', event.button, event.xdata, event.ydata<br>
<br>
cid = fig.canvas.mpl_connect('button_press_event', on_press)<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.backend_bases.html#MouseEvent">MouseEvent</a></dd>
<dd><a href="matplotlib.backend_bases.html#LocationEvent">LocationEvent</a></dd>
<dd><a href="matplotlib.backend_bases.html#Event">Event</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="MouseEvent-__init__"><strong>__init__</strong></a>(self, name, canvas, x, y, button<font color="#909090">=None</font>, key<font color="#909090">=None</font>, step<font color="#909090">=0</font>, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>x, y in figure coords, 0,0 = bottom, left<br>
button pressed None, 1, 2, 3, 'up', 'down'</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>button</strong> = None</dl>
<dl><dt><strong>inaxes</strong> = None</dl>
<dl><dt><strong>step</strong> = None</dl>
<dl><dt><strong>x</strong> = None</dl>
<dl><dt><strong>xdata</strong> = None</dl>
<dl><dt><strong>y</strong> = None</dl>
<dl><dt><strong>ydata</strong> = None</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="NavigationToolbar2">class <strong>NavigationToolbar2</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Base class for the navigation cursor, version 2<br>
<br>
backends must implement a canvas that handles connections for<br>
'button_press_event' and 'button_release_event'. See<br>
:meth:`<a href="#FigureCanvasBase">FigureCanvasBase</a>.mpl_connect` for more information<br>
<br>
<br>
They must also define<br>
<br>
:meth:`save_figure`<br>
save the current figure<br>
<br>
:meth:`set_cursor`<br>
if you want the pointer icon to change<br>
<br>
:meth:`_init_toolbar`<br>
create your toolbar widget<br>
<br>
:meth:`draw_rubberband` (optional)<br>
draw the zoom to rect "rubberband" rectangle<br>
<br>
:meth:`press` (optional)<br>
whenever a mouse button is pressed, you'll be notified with<br>
the event<br>
<br>
:meth:`release` (optional)<br>
whenever a mouse button is released, you'll be notified with<br>
the event<br>
<br>
:meth:`dynamic_update` (optional)<br>
dynamically update the window while navigating<br>
<br>
:meth:`set_message` (optional)<br>
display message<br>
<br>
:meth:`set_history_buttons` (optional)<br>
you can change the history back / forward buttons to<br>
indicate disabled / enabled state.<br>
<br>
That's it, we'll do the rest!<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="NavigationToolbar2-__init__"><strong>__init__</strong></a>(self, canvas)</dt></dl>
<dl><dt><a name="NavigationToolbar2-back"><strong>back</strong></a>(self, *args)</dt><dd><tt>move back up the view lim stack</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-drag_pan"><strong>drag_pan</strong></a>(self, event)</dt><dd><tt>the drag callback in pan/zoom mode</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-draw"><strong>draw</strong></a>(self)</dt><dd><tt>redraw the canvases, update the locators</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-draw_rubberband"><strong>draw_rubberband</strong></a>(self, event, x0, y0, x1, y1)</dt><dd><tt>draw a rectangle rubberband to indicate zoom limits</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-dynamic_update"><strong>dynamic_update</strong></a>(self)</dt></dl>
<dl><dt><a name="NavigationToolbar2-forward"><strong>forward</strong></a>(self, *args)</dt><dd><tt>move forward in the view lim stack</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-home"><strong>home</strong></a>(self, *args)</dt><dd><tt>restore the original view</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-mouse_move"><strong>mouse_move</strong></a>(self, event)</dt></dl>
<dl><dt><a name="NavigationToolbar2-pan"><strong>pan</strong></a>(self, *args)</dt><dd><tt>Activate the pan/zoom tool. pan with left button, zoom with right</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-press"><strong>press</strong></a>(self, event)</dt><dd><tt>this will be called whenver a mouse button is pressed</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-press_pan"><strong>press_pan</strong></a>(self, event)</dt><dd><tt>the press mouse button in pan/zoom mode callback</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-press_zoom"><strong>press_zoom</strong></a>(self, event)</dt><dd><tt>the press mouse button in zoom to rect mode callback</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-push_current"><strong>push_current</strong></a>(self)</dt><dd><tt>push the current view limits and position onto the stack</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-release"><strong>release</strong></a>(self, event)</dt><dd><tt>this will be called whenever mouse button is released</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-release_pan"><strong>release_pan</strong></a>(self, event)</dt><dd><tt>the release mouse button callback in pan/zoom mode</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-release_zoom"><strong>release_zoom</strong></a>(self, event)</dt><dd><tt>the release mouse button callback in zoom to rect mode</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-save_figure"><strong>save_figure</strong></a>(self, *args)</dt><dd><tt>save the current figure</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-set_cursor"><strong>set_cursor</strong></a>(self, cursor)</dt><dd><tt>Set the current cursor to one of the :class:`<a href="#Cursors">Cursors</a>`<br>
enums values</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-set_history_buttons"><strong>set_history_buttons</strong></a>(self)</dt><dd><tt>enable or disable back/forward button</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-set_message"><strong>set_message</strong></a>(self, s)</dt><dd><tt>display a message on toolbar or in status bar</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-update"><strong>update</strong></a>(self)</dt><dd><tt>reset the axes stack</tt></dd></dl>
<dl><dt><a name="NavigationToolbar2-zoom"><strong>zoom</strong></a>(self, *args)</dt><dd><tt>activate zoom to rect mode</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="PickEvent">class <strong>PickEvent</strong></a>(<a href="matplotlib.backend_bases.html#Event">Event</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>a pick event, fired when the user picks a location on the canvas<br>
sufficiently close to an artist.<br>
<br>
Attrs: all the :class:`<a href="#Event">Event</a>` attributes plus<br>
<br>
*mouseevent*<br>
the :class:`<a href="#MouseEvent">MouseEvent</a>` that generated the pick<br>
<br>
*artist*<br>
the :class:`~matplotlib.artist.Artist` picked<br>
<br>
other<br>
extra class dependent attrs -- eg a<br>
:class:`~matplotlib.lines.Line2D` pick may define different<br>
extra attributes than a<br>
:class:`~matplotlib.collections.PatchCollection` pick event<br>
<br>
<br>
Example usage::<br>
<br>
line, = ax.plot(rand(100), 'o', picker=5) # 5 points tolerance<br>
<br>
def on_pick(event):<br>
thisline = event.artist<br>
xdata, ydata = thisline.get_data()<br>
ind = event.ind<br>
print 'on pick line:', zip(xdata[ind], ydata[ind])<br>
<br>
cid = fig.canvas.mpl_connect('pick_event', on_pick)<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="PickEvent-__init__"><strong>__init__</strong></a>(self, name, canvas, mouseevent, artist, guiEvent<font color="#909090">=None</font>, **kwargs)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="RendererBase">class <strong>RendererBase</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An abstract base class to handle drawing/rendering operations.<br>
<br>
The following methods *must* be implemented in the backend:<br>
<br>
* :meth:`draw_path`<br>
* :meth:`draw_image`<br>
* :meth:`draw_text`<br>
* :meth:`get_text_width_height_descent`<br>
<br>
The following methods *should* be implemented in the backend for<br>
optimization reasons:<br>
<br>
* :meth:`draw_markers`<br>
* :meth:`draw_path_collection`<br>
* :meth:`draw_quad_mesh`<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RendererBase-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="RendererBase-close_group"><strong>close_group</strong></a>(self, s)</dt><dd><tt>Close a grouping element with label *s*<br>
Is only currently used by :mod:`~matplotlib.backends.backend_svg`</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_image"><strong>draw_image</strong></a>(self, x, y, im, bbox, clippath<font color="#909090">=None</font>, clippath_trans<font color="#909090">=None</font>)</dt><dd><tt>Draw the image instance into the current axes;<br>
<br>
*x*<br>
is the distance in pixels from the left hand side of the canvas.<br>
<br>
*y*<br>
the distance from the origin. That is, if origin is<br>
upper, y is the distance from top. If origin is lower, y<br>
is the distance from bottom<br>
<br>
*im*<br>
the :class:`matplotlib._image.Image` instance<br>
<br>
*bbox*<br>
a :class:`matplotlib.transforms.Bbox` instance for clipping, or<br>
None</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_markers"><strong>draw_markers</strong></a>(self, gc, marker_path, marker_trans, path, trans, rgbFace<font color="#909090">=None</font>)</dt><dd><tt>Draws a marker at each of the vertices in path. This includes<br>
all vertices, including control points on curves. To avoid<br>
that behavior, those vertices should be removed before calling<br>
this function.<br>
<br>
*gc*<br>
the :class:`<a href="#GraphicsContextBase">GraphicsContextBase</a>` instance<br>
<br>
*marker_trans*<br>
is an affine transform applied to the marker.<br>
<br>
*trans*<br>
is an affine transform applied to the path.<br>
<br>
This provides a fallback implementation of draw_markers that<br>
makes multiple calls to :meth:`draw_path`. Some backends may<br>
want to override this method in order to draw the marker only<br>
once and reuse it multiple times.</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_path"><strong>draw_path</strong></a>(self, gc, path, transform, rgbFace<font color="#909090">=None</font>)</dt><dd><tt>Draws a :class:`~matplotlib.path.Path` instance using the<br>
given affine transform.</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_path_collection"><strong>draw_path_collection</strong></a>(self, master_transform, cliprect, clippath, clippath_trans, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds)</dt><dd><tt>Draws a collection of paths, selecting drawing properties from<br>
the lists *facecolors*, *edgecolors*, *linewidths*,<br>
*linestyles* and *antialiaseds*. *offsets* is a list of<br>
offsets to apply to each of the paths. The offsets in<br>
*offsets* are first transformed by *offsetTrans* before<br>
being applied.<br>
<br>
This provides a fallback implementation of<br>
:meth:`draw_path_collection` that makes multiple calls to<br>
draw_path. Some backends may want to override this in order<br>
to render each set of path data only once, and then reference<br>
that path multiple times with the different offsets, colors,<br>
styles etc. The generator methods<br>
:meth:`_iter_collection_raw_paths` and<br>
:meth:`_iter_collection` are provided to help with (and<br>
standardize) the implementation across backends. It is highly<br>
recommended to use those generators, so that changes to the<br>
behavior of :meth:`draw_path_collection` can be made globally.</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_quad_mesh"><strong>draw_quad_mesh</strong></a>(self, master_transform, cliprect, clippath, clippath_trans, meshWidth, meshHeight, coordinates, offsets, offsetTrans, facecolors, antialiased, showedges)</dt><dd><tt>This provides a fallback implementation of<br>
:meth:`draw_quad_mesh` that generates paths and then calls<br>
:meth:`draw_path_collection`.</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_tex"><strong>draw_tex</strong></a>(self, gc, x, y, s, prop, angle, ismath<font color="#909090">='TeX!'</font>)</dt></dl>
<dl><dt><a name="RendererBase-draw_text"><strong>draw_text</strong></a>(self, gc, x, y, s, prop, angle, ismath<font color="#909090">=False</font>)</dt><dd><tt>Draw the text instance<br>
<br>
*gc*<br>
the :class:`<a href="#GraphicsContextBase">GraphicsContextBase</a>` instance<br>
<br>
*x*<br>
the x location of the text in display coords<br>
<br>
*y*<br>
the y location of the text in display coords<br>
<br>
*s*<br>
a :class:`matplotlib.text.Text` instance<br>
<br>
*prop*<br>
a :class:`matplotlib.font_manager.FontProperties` instance<br>
<br>
*angle*<br>
the rotation angle in degrees<br>
<br>
**backend implementers note**<br>
<br>
When you are trying to determine if you have gotten your bounding box<br>
right (which is what enables the text layout/alignment to work<br>
properly), it helps to change the line in text.py::<br>
<br>
if 0: bbox_artist(self, renderer)<br>
<br>
to if 1, and then the actual bounding box will be blotted along with<br>
your text.</tt></dd></dl>
<dl><dt><a name="RendererBase-flipy"><strong>flipy</strong></a>(self)</dt><dd><tt>Return true if y small numbers are top for renderer Is used<br>
for drawing text (:mod:`matplotlib.text`) and images<br>
(:mod:`matplotlib.image`) only</tt></dd></dl>
<dl><dt><a name="RendererBase-get_canvas_width_height"><strong>get_canvas_width_height</strong></a>(self)</dt><dd><tt>return the canvas width and height in display coords</tt></dd></dl>
<dl><dt><a name="RendererBase-get_image_magnification"><strong>get_image_magnification</strong></a>(self)</dt><dd><tt>Get the factor by which to magnify images passed to :meth:`draw_image`.<br>
Allows a backend to have images at a different resolution to other<br>
artists.</tt></dd></dl>
<dl><dt><a name="RendererBase-get_texmanager"><strong>get_texmanager</strong></a>(self)</dt><dd><tt>return the :class:`matplotlib.texmanager.TexManager` instance</tt></dd></dl>
<dl><dt><a name="RendererBase-get_text_width_height_descent"><strong>get_text_width_height_descent</strong></a>(self, s, prop, ismath)</dt><dd><tt>get the width and height, and the offset from the bottom to the<br>
baseline (descent), in display coords of the string s with<br>
:class:`~matplotlib.font_manager.FontProperties` prop</tt></dd></dl>
<dl><dt><a name="RendererBase-new_gc"><strong>new_gc</strong></a>(self)</dt><dd><tt>Return an instance of a :class:`<a href="#GraphicsContextBase">GraphicsContextBase</a>`</tt></dd></dl>
<dl><dt><a name="RendererBase-open_group"><strong>open_group</strong></a>(self, s)</dt><dd><tt>Open a grouping element with label *s*. Is only currently used by<br>
:mod:`~matplotlib.backends.backend_svg`</tt></dd></dl>
<dl><dt><a name="RendererBase-option_image_nocomposite"><strong>option_image_nocomposite</strong></a>(self)</dt><dd><tt>overwrite this method for renderers that do not necessarily<br>
want to rescale and composite raster images. (like SVG)</tt></dd></dl>
<dl><dt><a name="RendererBase-points_to_pixels"><strong>points_to_pixels</strong></a>(self, points)</dt><dd><tt>Convert points to display units<br>
<br>
*points*<br>
a float or a numpy array of float<br>
<br>
return points converted to pixels<br>
<br>
You need to override this function (unless your backend<br>
doesn't have a dpi, eg, postscript or svg). Some imaging<br>
systems assume some value for pixels per inch::<br>
<br>
points to pixels = points * pixels_per_inch/72.0 * dpi/72.0</tt></dd></dl>
<dl><dt><a name="RendererBase-start_rasterizing"><strong>start_rasterizing</strong></a>(self)</dt></dl>
<dl><dt><a name="RendererBase-stop_rasterizing"><strong>stop_rasterizing</strong></a>(self)</dt></dl>
<dl><dt><a name="RendererBase-strip_math"><strong>strip_math</strong></a>(self, s)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="ResizeEvent">class <strong>ResizeEvent</strong></a>(<a href="matplotlib.backend_bases.html#Event">Event</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An event triggered by a canvas resize<br>
<br>
In addition to the :class:`<a href="#Event">Event</a>` attributes, the following event attributes are defined:<br>
<br>
*width*<br>
width of the canvas in pixels<br>
<br>
*height*<br>
height of the canvas in pixels<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ResizeEvent-__init__"><strong>__init__</strong></a>(self, name, canvas)</dt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>cursors</strong> = <matplotlib.backend_bases.Cursors instance at 0x1495cb0><br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>rcParams</strong> = {'figure.subplot.right': 0.90000000000000002, 'm...persize': 'letter', 'svg.embed_char_paths': True}</td></tr></table>
@footer@