513 lines (428 with data), 33.7 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>.widgets</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/widgets.py">/home/jdhunter/dev/lib/python2.5/site-packages/matplotlib/widgets.py</a></font></td></tr></table>
<p><tt>GUI Neutral widgets<br>
<br>
All of these widgets require you to predefine an Axes instance and<br>
pass that as the first arg. matplotlib doesn't try to be too smart in<br>
layout -- you have to figure out how wide and tall you want your Axes<br>
to be to accommodate your widget.</tt></p>
<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.widgets.html#Cursor">Cursor</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#LockDraw">LockDraw</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#MultiCursor">MultiCursor</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#RectangleSelector">RectangleSelector</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#SpanSelector">SpanSelector</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#HorizontalSpanSelector">HorizontalSpanSelector</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#Widget">Widget</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#Button">Button</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#CheckButtons">CheckButtons</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#Lasso">Lasso</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#RadioButtons">RadioButtons</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#Slider">Slider</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.widgets.html#SubplotTool">SubplotTool</a>
</font></dt></dl>
</dd>
</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="Button">class <strong>Button</strong></a>(<a href="matplotlib.widgets.html#Widget">Widget</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A GUI neutral button<br>
<br>
The following attributes are accesible<br>
<br>
ax - the Axes the button renders into<br>
label - a text.Text instance<br>
color - the color of the button when not hovering<br>
hovercolor - the color of the button when hovering<br>
<br>
Call "on_clicked" to connect to the button<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Button-__init__"><strong>__init__</strong></a>(self, ax, label, image<font color="#909090">=None</font>, color<font color="#909090">='0.85'</font>, hovercolor<font color="#909090">='0.95'</font>)</dt><dd><tt>ax is the Axes instance the button will be placed into<br>
<br>
label is a string which is the button text<br>
<br>
image if not None, is an image to place in the button -- can<br>
be any legal arg to imshow (array, matplotlib Image<br>
instance, or PIL image)<br>
<br>
color is the color of the button when not activated<br>
<br>
hovercolor is the color of the button when the mouse is over<br>
it</tt></dd></dl>
<dl><dt><a name="Button-disconnect"><strong>disconnect</strong></a>(self, cid)</dt><dd><tt>remove the observer with connection id cid</tt></dd></dl>
<dl><dt><a name="Button-on_clicked"><strong>on_clicked</strong></a>(self, func)</dt><dd><tt>When the button is clicked, call this func with event<br>
<br>
A connection id is returned which can be used to disconnect</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.widgets.html#Widget">Widget</a>:<br>
<dl><dt><strong>drawon</strong> = True</dl>
<dl><dt><strong>eventson</strong> = True</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="CheckButtons">class <strong>CheckButtons</strong></a>(<a href="matplotlib.widgets.html#Widget">Widget</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A GUI neutral radio button<br>
<br>
The following attributes are exposed<br>
<br>
ax - the Axes instance the buttons are in<br>
labels - a list of text.Text instances<br>
lines - a list of (line1, line2) tuples for the x's in the check boxes.<br>
These lines exist for each box, but have set_visible(False) when<br>
box is not checked<br>
rectangles - a list of patch.Rectangle instances<br>
<br>
Connect to the <a href="#CheckButtons">CheckButtons</a> with the on_clicked method<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="CheckButtons-__init__"><strong>__init__</strong></a>(self, ax, labels, actives)</dt><dd><tt>Add check buttons to axes.Axes instance ax<br>
<br>
labels is a len(buttons) list of labels as strings<br>
<br>
actives is a len(buttons) list of booleans indicating whether<br>
the button is active</tt></dd></dl>
<dl><dt><a name="CheckButtons-disconnect"><strong>disconnect</strong></a>(self, cid)</dt><dd><tt>remove the observer with connection id cid</tt></dd></dl>
<dl><dt><a name="CheckButtons-on_clicked"><strong>on_clicked</strong></a>(self, func)</dt><dd><tt>When the button is clicked, call this func with button label<br>
<br>
A connection id is returned which can be used to disconnect</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.widgets.html#Widget">Widget</a>:<br>
<dl><dt><strong>drawon</strong> = True</dl>
<dl><dt><strong>eventson</strong> = True</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="Cursor">class <strong>Cursor</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A horizontal and vertical line span the axes that and move with<br>
the pointer. You can turn off the hline or vline spectively with<br>
the attributes<br>
<br>
horizOn =True|False: controls visibility of the horizontal line<br>
vertOn =True|False: controls visibility of the horizontal line<br>
<br>
And the visibility of the cursor itself with visible attribute<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Cursor-__init__"><strong>__init__</strong></a>(self, ax, useblit<font color="#909090">=False</font>, **lineprops)</dt><dd><tt>Add a cursor to ax. If useblit=True, use the backend<br>
dependent blitting features for faster updates (GTKAgg only<br>
now). lineprops is a dictionary of line properties. See<br>
examples/widgets/cursor.py.</tt></dd></dl>
<dl><dt><a name="Cursor-clear"><strong>clear</strong></a>(self, event)</dt><dd><tt>clear the cursor</tt></dd></dl>
<dl><dt><a name="Cursor-onmove"><strong>onmove</strong></a>(self, event)</dt><dd><tt>on mouse motion draw the cursor if visible</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="HorizontalSpanSelector">class <strong>HorizontalSpanSelector</strong></a>(<a href="matplotlib.widgets.html#SpanSelector">SpanSelector</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt># For backwards compatibility only!<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="HorizontalSpanSelector-__init__"><strong>__init__</strong></a>(self, ax, onselect, **kwargs)</dt></dl>
<hr>
Methods inherited from <a href="matplotlib.widgets.html#SpanSelector">SpanSelector</a>:<br>
<dl><dt><a name="HorizontalSpanSelector-ignore"><strong>ignore</strong></a>(self, event)</dt><dd><tt>return True if event should be ignored</tt></dd></dl>
<dl><dt><a name="HorizontalSpanSelector-onmove"><strong>onmove</strong></a>(self, event)</dt><dd><tt>on motion notify event</tt></dd></dl>
<dl><dt><a name="HorizontalSpanSelector-press"><strong>press</strong></a>(self, event)</dt><dd><tt>on button press event</tt></dd></dl>
<dl><dt><a name="HorizontalSpanSelector-release"><strong>release</strong></a>(self, event)</dt><dd><tt>on button release event</tt></dd></dl>
<dl><dt><a name="HorizontalSpanSelector-update"><strong>update</strong></a>(self)</dt><dd><tt>draw using newfangled blit or oldfangled draw depending on useblit</tt></dd></dl>
<dl><dt><a name="HorizontalSpanSelector-update_background"><strong>update_background</strong></a>(self, event)</dt><dd><tt>force an update of the background</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="Lasso">class <strong>Lasso</strong></a>(<a href="matplotlib.widgets.html#Widget">Widget</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Lasso-__init__"><strong>__init__</strong></a>(self, ax, xy, callback<font color="#909090">=None</font>, useblit<font color="#909090">=True</font>)</dt></dl>
<dl><dt><a name="Lasso-onmove"><strong>onmove</strong></a>(self, event)</dt></dl>
<dl><dt><a name="Lasso-onrelease"><strong>onrelease</strong></a>(self, event)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.widgets.html#Widget">Widget</a>:<br>
<dl><dt><strong>drawon</strong> = True</dl>
<dl><dt><strong>eventson</strong> = True</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="LockDraw">class <strong>LockDraw</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>some widgets, like the cursor, draw onto the canvas, and this is not<br>
desirable under all circumstaces, like when the toolbar is in<br>
zoom-to-rect mode and drawing a rectangle. The module level "lock"<br>
allows someone to grab the lock and prevent other widgets from<br>
drawing. Use matplotlib.widgets.lock(someobj) to pr<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="LockDraw-__call__"><strong>__call__</strong></a>(self, o)</dt><dd><tt>reserve the lock for o</tt></dd></dl>
<dl><dt><a name="LockDraw-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="LockDraw-available"><strong>available</strong></a>(self, o)</dt><dd><tt>drawing is available to o</tt></dd></dl>
<dl><dt><a name="LockDraw-isowner"><strong>isowner</strong></a>(self, o)</dt><dd><tt>o owns the lock</tt></dd></dl>
<dl><dt><a name="LockDraw-locked"><strong>locked</strong></a>(self)</dt><dd><tt>the lock is held</tt></dd></dl>
<dl><dt><a name="LockDraw-release"><strong>release</strong></a>(self, o)</dt><dd><tt>release the lock</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="MultiCursor">class <strong>MultiCursor</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Provide a vertical line cursor shared between multiple axes<br>
<br>
from matplotlib.widgets import <a href="#MultiCursor">MultiCursor</a><br>
from pylab import figure, show, nx<br>
<br>
t = nx.arange(0.0, 2.0, 0.01)<br>
s1 = nx.sin(2*nx.pi*t)<br>
s2 = nx.sin(4*nx.pi*t)<br>
fig = figure()<br>
ax1 = fig.add_subplot(211)<br>
ax1.plot(t, s1)<br>
<br>
<br>
ax2 = fig.add_subplot(212, sharex=ax1)<br>
ax2.plot(t, s2)<br>
<br>
multi = <a href="#MultiCursor">MultiCursor</a>(fig.canvas, (ax1, ax2), color='r', lw=1)<br>
show()<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MultiCursor-__init__"><strong>__init__</strong></a>(self, canvas, axes, useblit<font color="#909090">=True</font>, **lineprops)</dt></dl>
<dl><dt><a name="MultiCursor-clear"><strong>clear</strong></a>(self, event)</dt><dd><tt>clear the cursor</tt></dd></dl>
<dl><dt><a name="MultiCursor-onmove"><strong>onmove</strong></a>(self, event)</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="RadioButtons">class <strong>RadioButtons</strong></a>(<a href="matplotlib.widgets.html#Widget">Widget</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A GUI neutral radio button<br>
<br>
The following attributes are exposed<br>
<br>
ax - the Axes instance the buttons are in<br>
activecolor - the color of the button when clicked<br>
labels - a list of text.Text instances<br>
circles - a list of patch.Circle instances<br>
<br>
Connect to the <a href="#RadioButtons">RadioButtons</a> with the on_clicked method<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RadioButtons-__init__"><strong>__init__</strong></a>(self, ax, labels, active<font color="#909090">=0</font>, activecolor<font color="#909090">='blue'</font>)</dt><dd><tt>Add radio buttons to axes.Axes instance ax<br>
<br>
labels is a len(buttons) list of labels as strings<br>
<br>
active is the index into labels for the button that is active<br>
<br>
activecolor is the color of the button when clicked</tt></dd></dl>
<dl><dt><a name="RadioButtons-disconnect"><strong>disconnect</strong></a>(self, cid)</dt><dd><tt>remove the observer with connection id cid</tt></dd></dl>
<dl><dt><a name="RadioButtons-on_clicked"><strong>on_clicked</strong></a>(self, func)</dt><dd><tt>When the button is clicked, call this func with button label<br>
<br>
A connection id is returned which can be used to disconnect</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.widgets.html#Widget">Widget</a>:<br>
<dl><dt><strong>drawon</strong> = True</dl>
<dl><dt><strong>eventson</strong> = True</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="RectangleSelector">class <strong>RectangleSelector</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Select a min/max range of the x axes for a matplotlib Axes<br>
<br>
Example usage:<br>
<br>
ax = subplot(111)<br>
ax.plot(x,y)<br>
<br>
def onselect(eclick, erelease):<br>
'eclick and erelease are matplotlib events at press and release'<br>
print 'startposition : (%f,%f)'%(eclick.xdata, eclick.ydata)<br>
print 'endposition : (%f,%f)'%(erelease.xdata, erelease.ydata)<br>
print 'used button : ', eclick.button<br>
<br>
span = Selector(ax, onselect,drawtype='box')<br>
show()<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RectangleSelector-__init__"><strong>__init__</strong></a>(self, ax, onselect, drawtype<font color="#909090">='box'</font>, minspanx<font color="#909090">=None</font>, minspany<font color="#909090">=None</font>, useblit<font color="#909090">=False</font>, lineprops<font color="#909090">=None</font>, rectprops<font color="#909090">=None</font>)</dt><dd><tt>Create a selector in ax. When a selection is made, clear<br>
the span and call onselect with<br>
<br>
onselect(pos_1, pos_2)<br>
<br>
and clear the drawn box/line. There pos_i are arrays of length 2<br>
containing the x- and y-coordinate.<br>
<br>
If minspanx is not None then events smaller than minspanx<br>
in x direction are ignored(it's the same for y).<br>
<br>
The rect is drawn with rectprops; default<br>
rectprops = dict(facecolor='red', edgecolor = 'black',<br>
alpha=0.5, fill=False)<br>
<br>
The line is drawn with lineprops; default<br>
lineprops = dict(color='black', linestyle='-',<br>
linewidth = 2, alpha=0.5)<br>
<br>
Use type if you want the mouse to draw a line, a box or nothing<br>
between click and actual position ny setting<br>
drawtype = 'line', drawtype='box' or drawtype = 'none'.</tt></dd></dl>
<dl><dt><a name="RectangleSelector-ignore"><strong>ignore</strong></a>(self, event)</dt><dd><tt>return True if event should be ignored</tt></dd></dl>
<dl><dt><a name="RectangleSelector-onmove"><strong>onmove</strong></a>(self, event)</dt><dd><tt>on motion notify event if box/line is wanted</tt></dd></dl>
<dl><dt><a name="RectangleSelector-press"><strong>press</strong></a>(self, event)</dt><dd><tt>on button press event</tt></dd></dl>
<dl><dt><a name="RectangleSelector-release"><strong>release</strong></a>(self, event)</dt><dd><tt>on button release event</tt></dd></dl>
<dl><dt><a name="RectangleSelector-update"><strong>update</strong></a>(self)</dt><dd><tt>draw using newfangled blit or oldfangled draw depending on useblit</tt></dd></dl>
<dl><dt><a name="RectangleSelector-update_background"><strong>update_background</strong></a>(self, event)</dt><dd><tt>force an update of the background</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="Slider">class <strong>Slider</strong></a>(<a href="matplotlib.widgets.html#Widget">Widget</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A slider representing a floating point range<br>
<br>
The following attributes are defined<br>
ax : the slider axes.Axes instance<br>
val : the current slider value<br>
vline : a Line2D instance representing the initial value<br>
poly : A patch.Polygon instance which is the slider<br>
valfmt : the format string for formatting the slider text<br>
label : a text.Text instance, the slider label<br>
closedmin : whether the slider is closed on the minimum<br>
closedmax : whether the slider is closed on the maximum<br>
slidermin : another slider - if not None, this slider must be > slidermin<br>
slidermax : another slider - if not None, this slider must be < slidermax<br>
dragging : allow for mouse dragging on slider<br>
<br>
Call on_changed to connect to the slider event<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Slider-__init__"><strong>__init__</strong></a>(self, ax, label, valmin, valmax, valinit<font color="#909090">=0.5</font>, valfmt<font color="#909090">='%1.2f'</font>, closedmin<font color="#909090">=True</font>, closedmax<font color="#909090">=True</font>, slidermin<font color="#909090">=None</font>, slidermax<font color="#909090">=None</font>, dragging<font color="#909090">=True</font>)</dt><dd><tt>Create a slider from valmin to valmax in axes ax;<br>
<br>
valinit - the slider initial position<br>
<br>
label - the slider label<br>
<br>
valfmt - used to format the slider value<br>
<br>
closedmin and closedmax - indicate whether the slider interval is closed<br>
<br>
slidermin and slidermax - be used to contrain the value of<br>
this slider to the values of other sliders.</tt></dd></dl>
<dl><dt><a name="Slider-disconnect"><strong>disconnect</strong></a>(self, cid)</dt><dd><tt>remove the observer with connection id cid</tt></dd></dl>
<dl><dt><a name="Slider-on_changed"><strong>on_changed</strong></a>(self, func)</dt><dd><tt>When the slider valud is changed, call this func with the new<br>
slider position<br>
<br>
A connection id is returned which can be used to disconnect</tt></dd></dl>
<dl><dt><a name="Slider-reset"><strong>reset</strong></a>(self)</dt><dd><tt>reset the slider to the initial value if needed</tt></dd></dl>
<dl><dt><a name="Slider-set_val"><strong>set_val</strong></a>(self, val)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.widgets.html#Widget">Widget</a>:<br>
<dl><dt><strong>drawon</strong> = True</dl>
<dl><dt><strong>eventson</strong> = True</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="SpanSelector">class <strong>SpanSelector</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Select a min/max range of the x or y axes for a matplotlib Axes<br>
<br>
Example usage:<br>
<br>
ax = subplot(111)<br>
ax.plot(x,y)<br>
<br>
def onselect(vmin, vmax):<br>
print vmin, vmax<br>
span = <a href="#SpanSelector">SpanSelector</a>(ax, onselect, 'horizontal')<br>
<br>
onmove_callback is an optional callback that will be called on mouse move<br>
with the span range<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SpanSelector-__init__"><strong>__init__</strong></a>(self, ax, onselect, direction, minspan<font color="#909090">=None</font>, useblit<font color="#909090">=False</font>, rectprops<font color="#909090">=None</font>, onmove_callback<font color="#909090">=None</font>)</dt><dd><tt>Create a span selector in ax. When a selection is made, clear<br>
the span and call onselect with<br>
<br>
onselect(vmin, vmax)<br>
<br>
and clear the span.<br>
<br>
direction must be 'horizontal' or 'vertical'<br>
<br>
If minspan is not None, ignore events smaller than minspan<br>
<br>
The span rect is drawn with rectprops; default<br>
rectprops = dict(facecolor='red', alpha=0.5)<br>
<br>
set the visible attribute to False if you want to turn off<br>
the functionality of the span selector</tt></dd></dl>
<dl><dt><a name="SpanSelector-ignore"><strong>ignore</strong></a>(self, event)</dt><dd><tt>return True if event should be ignored</tt></dd></dl>
<dl><dt><a name="SpanSelector-onmove"><strong>onmove</strong></a>(self, event)</dt><dd><tt>on motion notify event</tt></dd></dl>
<dl><dt><a name="SpanSelector-press"><strong>press</strong></a>(self, event)</dt><dd><tt>on button press event</tt></dd></dl>
<dl><dt><a name="SpanSelector-release"><strong>release</strong></a>(self, event)</dt><dd><tt>on button release event</tt></dd></dl>
<dl><dt><a name="SpanSelector-update"><strong>update</strong></a>(self)</dt><dd><tt>draw using newfangled blit or oldfangled draw depending on useblit</tt></dd></dl>
<dl><dt><a name="SpanSelector-update_background"><strong>update_background</strong></a>(self, event)</dt><dd><tt>force an update of the background</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="SubplotTool">class <strong>SubplotTool</strong></a>(<a href="matplotlib.widgets.html#Widget">Widget</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A tool to adjust to subplot params of fig<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SubplotTool-__init__"><strong>__init__</strong></a>(self, targetfig, toolfig)</dt><dd><tt>targetfig is the figure to adjust<br>
<br>
toolfig is the figure to embed the the subplot tool into. If<br>
None, a default pylab figure will be created. If you are<br>
using this from the GUI</tt></dd></dl>
<dl><dt><a name="SubplotTool-funcbottom"><strong>funcbottom</strong></a>(self, val)</dt></dl>
<dl><dt><a name="SubplotTool-funchspace"><strong>funchspace</strong></a>(self, val)</dt></dl>
<dl><dt><a name="SubplotTool-funcleft"><strong>funcleft</strong></a>(self, val)</dt></dl>
<dl><dt><a name="SubplotTool-funcright"><strong>funcright</strong></a>(self, val)</dt></dl>
<dl><dt><a name="SubplotTool-functop"><strong>functop</strong></a>(self, val)</dt></dl>
<dl><dt><a name="SubplotTool-funcwspace"><strong>funcwspace</strong></a>(self, val)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.widgets.html#Widget">Widget</a>:<br>
<dl><dt><strong>drawon</strong> = True</dl>
<dl><dt><strong>eventson</strong> = True</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="Widget">class <strong>Widget</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>OK, I couldn't resist; abstract base class for mpl GUI neutral<br>
widgets<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Data and other attributes defined here:<br>
<dl><dt><strong>drawon</strong> = True</dl>
<dl><dt><strong>eventson</strong> = True</dl>
</td></tr></table></td></tr></table>
@footer@