750 lines (604 with data), 54.6 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/lib/python2.5/site-packages/matplotlib/backend_bases.py">/home/jdhunter/dev/lib/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</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="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="warnings.html">warnings</a><br>
</td><td width="25%" valign=top><a href="matplotlib.widgets.html">matplotlib.widgets</a><br>
</td><td width="25%" valign=top></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#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>
Attributes are<br>
name<br>
canvas<br>
renderer - the Renderer instance<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>
FigureCanvas.connect. The following attributes are defined and<br>
shown with their default values<br>
name # the event name<br>
canvas # the FigureCanvas instance generating the 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 attribute<br>
<br>
figure - A 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 <a href="#MouseEvent">MouseEvent</a></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. x,y are the canvas coords: 0,0 is lower, left.<br>
button and key are as defined in <a href="#MouseEvent">MouseEvent</a></tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-draw"><strong>draw</strong></a>(self, *args, **kwargs)</dt><dd><tt>Render the 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></dl>
<dl><dt><a name="FigureCanvasBase-draw_idle"><strong>draw_idle</strong></a>(self, *args, **kwargs)</dt><dd><tt>draw only if idle; defaults to draw but backends can overrride</tt></dd></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-key_press_event"><strong>key_press_event</strong></a>(self, key, guiEvent<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="FigureCanvasBase-key_release_event"><strong>key_release_event</strong></a>(self, key, guiEvent<font color="#909090">=None</font>)</dt></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. x,y are the canvas coords: 0,0 is lower, left.<br>
button and key are as defined in <a href="#MouseEvent">MouseEvent</a></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 MplEvent. The following events are recognized<br>
<br>
'resize_event',<br>
'draw_event',<br>
'key_press_event',<br>
'key_release_event',<br>
'button_press_event',<br>
'button_release_event',<br>
'motion_notify_event',<br>
'pick_event', <br>
<br>
<br>
For the three events above, if the mouse is over the axes,<br>
the variable event.inaxes will be set to the axes it is over,<br>
and additionally, the variables event.xdata and event.ydata<br>
will be defined. This is the mouse location in data coords.<br>
See backend_bases.MplEvent.<br>
<br>
return value is a connection id that can be used with<br>
mpl_disconnect</tt></dd></dl>
<dl><dt><a name="FigureCanvasBase-mpl_disconnect"><strong>mpl_disconnect</strong></a>(self, cid)</dt><dd><tt>disconnect callback id cid</tt></dd></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 <a href="#PickEvent">PickEvent</a> callbacks registered listeners</tt></dd></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>, **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>
filename - can also be a file object on image backends<br>
orientation - only currently applies to PostScript printing.<br>
dpi - the dots per inch to save the figure in; if None, use savefig.dpi<br>
facecolor - the facecolor of the figure<br>
edgecolor - the edgecolor of the figure<br>
orientation - 'landscape' | 'portrait' (not supported on all backends)</tt></dd></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></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', 'motion_notify_event', 'pick_event')</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>
canvas - A FigureCanvas instance<br>
num - The figure number<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-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</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 (left, bottom, width, height)</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 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</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>
dash_offset is the offset (usually 0).<br>
dash_list specifies the on-off sequence as points<br>
(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 GraphicsContext converts colors to rgb internally. If you<br>
know the color is rgb already, you can set isRGB to True to<br>
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 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="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>
FigureCanvas.connect.<br>
<br>
The following attributes are defined and shown with their default<br>
values<br>
<br>
x = None # x position - pixels from left of canvas<br>
y = None # y position - pixels from bottom of canvas<br>
key = None # the key pressed: None, chr(range(255), shift, win, or control<br>
inaxes = None # the Axes instance if mouse us over axes<br>
xdata = None # x coord of mouse in data coords<br>
ydata = None # y coord of mouse in data coords<br>
<br>
This interface may change slightly when better support for<br>
modifier keys is included<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>button</strong> = None</dl>
<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>
x = None # x position - pixels from left of canvas<br>
y = None # y position - pixels from bottom of canvas<br>
inaxes = None # the Axes instance if mouse us over axes<br>
xdata = None # x coord of mouse in data coords<br>
ydata = None # 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<br>
button pressed None, 1, 2, 3</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>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,<br>
motion_notify_event).<br>
<br>
The following attributes are defined and shown with their default<br>
values<br>
<br>
x = None # x position - pixels from left of canvas<br>
y = None # y position - pixels from bottom of canvas<br>
button = None # button pressed None, 1, 2, 3<br>
key = None # the key pressed: None, chr(range(255), shift, win, or control<br>
inaxes = None # the Axes instance if mouse us over axes<br>
xdata = None # x coord of mouse in data coords<br>
ydata = None # y coord of mouse in data coords<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>, 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</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>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>
FigureCanvas.connect for more information<br>
<br>
<br>
They must also define<br>
<br>
* save_figure - save the current figure<br>
<br>
* set_cursor - if you want the pointer icon to change<br>
<br>
* _init_toolbar - create your toolbar widget<br>
<br>
* draw_rubberband (optional) : draw the zoom to rect<br>
"rubberband" rectangle<br>
<br>
* press : (optional) whenever a mouse button is pressed, you'll be<br>
notified with the event<br>
<br>
* release : (optional) whenever a mouse button is released,<br>
you'll be notified with the event<br>
<br>
* dynamic_update (optional) dynamically update the window while<br>
navigating<br>
<br>
* set_message (optional) - display message<br>
<br>
* set_history_buttons (optional) - you can change the history<br>
back / forward buttons to 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 backend_bases.<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 <a href="#Event">Event</a> attrs plus<br>
mouseevent : the <a href="#MouseEvent">MouseEvent</a> that generated the pick<br>
artist : the artist picked<br>
<br>
extra class dependent attrs -- eg a Line2D pick may define<br>
different extra attributes than a PatchCollection pick event<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> </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 backend_svg</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_arc"><strong>draw_arc</strong></a>(self, gc, rgbFace, x, y, width, height, angle1, angle2, rotation)</dt><dd><tt>Draw an arc using GraphicsContext instance gcEdge, centered at x,y,<br>
with width and height and angles from 0.0 to 360.0<br>
0 degrees is at 3-o'clock<br>
positive angles are anti-clockwise<br>
draw rotated 'rotation' degrees anti-clockwise about x,y<br>
<br>
If the color rgbFace is not None, fill the arc with it.</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_image"><strong>draw_image</strong></a>(self, x, y, im, bbox)</dt><dd><tt>Draw the Image instance into the current axes; x is the<br>
distance in pixels from the left hand side of the canvas. y is<br>
the distance from the origin. That is, if origin is upper, y<br>
is the distance from top. If origin is lower, y is the<br>
distance from bottom<br>
<br>
bbox is a matplotlib.transforms.BBox instance for clipping, or<br>
None</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_line"><strong>draw_line</strong></a>(self, gc, x1, y1, x2, y2)</dt><dd><tt>Draw a single line from x1,y1 to x2,y2</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_line_collection"><strong>draw_line_collection</strong></a>(self, segments, transform, clipbox, colors, linewidths, linestyle, antialiaseds, offsets, transOffset)</dt><dd><tt>This is a function for optimized line drawing. If you need to draw<br>
many line segments with similar properties, it is faster to avoid the<br>
overhead of all the object creation etc. The lack of total<br>
configurability is compensated for with efficiency. Hence we don't use<br>
a GC and many of the line props it supports. See<br>
matplotlib.collections for more details.<br>
<br>
segments is a sequence of ( line0, line1, line2), where linen =<br>
is an Mx2 array with columns x, y. Each line can be a<br>
different length<br>
<br>
transform is used to Transform the lines<br>
<br>
clipbox is a xmin, ymin, width, height clip rect<br>
<br>
colors is a tuple of RGBA tuples<br>
<br>
linewidths is a tuple of linewidths<br>
*** really should be called 'dashes' not 'linestyle', since<br>
we call gc.set_dashes() not gc.set_linestyle() ***<br>
<br>
linestyle is an (offset, onoffseq) tuple or None,None for solid<br>
<br>
antialiseds is a tuple of ones or zeros indicating whether the<br>
segment should be aa or not<br>
<br>
offsets, if not None, is an Nx2 array of x,y offsets to<br>
translate the lines by after transform is used to transform<br>
the offset coords<br>
<br>
This function could be overridden in the backend to possibly implement<br>
faster drawing, but it is already much faster than using <a href="#RendererBase-draw_lines">draw_lines</a>()<br>
by itself.</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_lines"><strong>draw_lines</strong></a>(self, gc, x, y, transform<font color="#909090">=None</font>)</dt><dd><tt>x and y are equal length arrays, draw lines connecting each<br>
point in x, y</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_point"><strong>draw_point</strong></a>(self, gc, x, y)</dt><dd><tt>Draw a single point at x,y<br>
Where 'point' is a device-unit point (or pixel), not a matplotlib point</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_poly_collection"><strong>draw_poly_collection</strong></a>(self, verts, transform, clipbox, facecolors, edgecolors, linewidths, antialiaseds, offsets, transOffset)</dt><dd><tt>Draw a polygon collection<br>
<br>
verts are a sequence of polygon vectors, where each polygon<br>
vector is a sequence of x,y tuples of vertices<br>
<br>
facecolors and edgecolors are a sequence of RGBA tuples<br>
linewidths are a sequence of linewidths<br>
antialiaseds are a sequence of 0,1 integers whether to use aa<br>
<br>
If a linewidth is zero or an edgecolor alpha is zero, the<br>
line will be omitted; similarly, the fill will be omitted<br>
if the facecolor alpha is zero.</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_polygon"><strong>draw_polygon</strong></a>(self, gc, rgbFace, points)</dt><dd><tt>Draw a polygon using the GraphicsContext instance gc.<br>
points is a len vertices tuple, each element<br>
giving the x,y coords a vertex<br>
<br>
If the color rgbFace is not None, fill the polygon with it</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_quad_mesh"><strong>draw_quad_mesh</strong></a>(self, meshWidth, meshHeight, colors, xCoords, yCoords, clipbox, transform, offsets, transOffset, showedges)</dt><dd><tt>Draw a quadrilateral mesh<br>
See documentation in QuadMesh class in collections.py for details</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_rectangle"><strong>draw_rectangle</strong></a>(self, gcEdge, rgbFace, x, y, width, height)</dt><dd><tt>Draw a non-filled rectangle using the GraphicsContext instance gcEdge,<br>
with lower left at x,y with width and height.<br>
<br>
If rgbFace is not None, fill the rectangle with it.</tt></dd></dl>
<dl><dt><a name="RendererBase-draw_regpoly_collection"><strong>draw_regpoly_collection</strong></a>(self, clipbox, offsets, transOffset, verts, sizes, facecolors, edgecolors, linewidths, antialiaseds)</dt><dd><tt>Draw a regular poly collection<br>
<br>
offsets - is a sequence is x,y tuples<br>
transOffset - maps this to display coords<br>
<br>
verts - are the vertices of the regular polygon at the origin<br>
<br>
sizes are the area of the circle that circumscribes the<br>
polygon in points^2<br>
<br>
facecolors and edgecolors are a sequence of RGBA tuples<br>
linewidths are a sequence of linewidths<br>
antialiaseds are a sequence of 0,1 integers whether to use aa</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.Text instance s at x,y (display coords) with font<br>
properties instance prop at angle in degrees, using GraphicsContext gc<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<br>
Is used for drawing text (text.py) and images (image.py) 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 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></dl>
<dl><dt><a name="RendererBase-get_text_extent"><strong>get_text_extent</strong></a>(self, text)</dt><dd><tt>Get the text extent in window coords</tt></dd></dl>
<dl><dt><a name="RendererBase-get_text_width_height"><strong>get_text_width_height</strong></a>(self, s, prop, ismath)</dt><dd><tt>get the width and height in display coords of the string s<br>
with FontPropertry 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 <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<br>
Is only currently used by 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>
points - a float or a numerix array of float<br>
return points converted to pixels<br>
<br>
You need to override this function (unless your backend doesn't have a<br>
dpi, eg, postscript or svg).<br>
Some imaging systems assume some value for pixels per inch.<br>
points to pixels = points * pixels_per_inch/72.0 * dpi/72.0</tt></dd></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>
Attributes are<br>
name<br>
canvas<br>
width # width of the canvas in pixels<br>
height # 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>Float</strong> = 'd'<br>
<strong>Float32</strong> = 'f'<br>
<strong>colorConverter</strong> = <matplotlib.colors.ColorConverter instance at 0x84120ac><br>
<strong>cursors</strong> = <matplotlib.backend_bases.Cursors instance at 0x8503bec><br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>isnan</strong> = <ufunc 'isnan'><br>
<strong>log</strong> = <ufunc 'log'><br>
<strong>pi</strong> = 3.1415926535897931<br>
<strong>sqrt</strong> = <ufunc 'sqrt'></td></tr></table>
@footer@