You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<spanid="matplotlib-widgets"></span><h2><aclass="reference internal" href="#module-matplotlib.widgets" title="matplotlib.widgets"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.widgets</span></tt></a><aclass="headerlink" href="#module-matplotlib.widgets" title="Permalink to this headline">¶</a></h2>
<divclass="section" id="gui-neutral-widgets">
<h3>GUI Neutral widgets<aclass="headerlink" href="#gui-neutral-widgets" title="Permalink to this headline">¶</a></h3>
<p>Widgets that are designed to work for any of the GUI backends.
All of these widgets require you to predefine an <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.axes.Axes</span></tt></a>
instance and pass that as the first arg. matplotlib doesn’t try to
be too smart with respect to layout – you will have to figure out how
wide and tall you want your Axes to be to accommodate your widget.</p>
<dlclass="class">
<dtid="matplotlib.widgets.AxesWidget">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">AxesWidget</tt><big>(</big><em>ax</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.AxesWidget" title="Permalink to this definition">¶</a></dt>
<p>Widget that is connected to a single <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><ttclass="xref py py-class docutils literal"><spanclass="pre">Axes</span></tt></a>.</p>
<ttclass="descname">connect_event</tt><big>(</big><em>event</em>, <em>callback</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.AxesWidget.connect_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Connect callback with an event.</p>
<p>This should be used in lieu of <ttclass="xref py py-obj docutils literal"><spanclass="pre">figure.canvas.mpl_connect</span></tt> since this
function stores call back ids for later clean up.</p>
<ttclass="descname">disconnect_events</tt><big>(</big><big>)</big><aclass="headerlink" href="#matplotlib.widgets.AxesWidget.disconnect_events" title="Permalink to this definition">¶</a></dt>
<dd><p>Disconnect all events created by this widget.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.AxesWidget.ignore">
<ttclass="descname">ignore</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.AxesWidget.ignore" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if event should be ignored.</p>
<p>This method (or a version of it) should be called at the beginning
of any event callback.</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.Button">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">Button</tt><big>(</big><em>ax</em>, <em>label</em>, <em>image=None</em>, <em>color='0.85'</em>, <em>hovercolor='0.95'</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Button" title="Permalink to this definition">¶</a></dt>
<dd>The color of the button when not hovering.</dd>
<dt><em>hovercolor</em></dt>
<dd>The color of the button when hovering.</dd>
</dl>
</div></blockquote>
<p>Call <aclass="reference internal" href="#matplotlib.widgets.Button.on_clicked" title="matplotlib.widgets.Button.on_clicked"><ttclass="xref py py-meth docutils literal"><spanclass="pre">on_clicked()</span></tt></a> to connect to the button</p>
<dd>The image to place in the button, if not <em>None</em>.
Can be any legal arg to imshow (numpy array,
matplotlib Image instance, or PIL image).</dd>
<dt><em>color</em></dt>
<dd>The color of the button when not activated</dd>
<dt><em>hovercolor</em></dt>
<dd>The color of the button when the mouse is over it</dd>
</dl>
<dlclass="method">
<dtid="matplotlib.widgets.Button.disconnect">
<ttclass="descname">disconnect</tt><big>(</big><em>cid</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Button.disconnect" title="Permalink to this definition">¶</a></dt>
<dd><p>remove the observer with connection id <em>cid</em></p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.Button.on_clicked">
<ttclass="descname">on_clicked</tt><big>(</big><em>func</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Button.on_clicked" title="Permalink to this definition">¶</a></dt>
<dd><p>When the button is clicked, call this <em>func</em> with event</p>
<p>A connection id is returned which can be used to disconnect</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.CheckButtons">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">CheckButtons</tt><big>(</big><em>ax</em>, <em>labels</em>, <em>actives</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.CheckButtons" title="Permalink to this definition">¶</a></dt>
<p>Connect to the CheckButtons with the <aclass="reference internal" href="#matplotlib.widgets.CheckButtons.on_clicked" title="matplotlib.widgets.CheckButtons.on_clicked"><ttclass="xref py py-meth docutils literal"><spanclass="pre">on_clicked()</span></tt></a> method</p>
<ttclass="descname">disconnect</tt><big>(</big><em>cid</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.CheckButtons.disconnect" title="Permalink to this definition">¶</a></dt>
<dd><p>remove the observer with connection id <em>cid</em></p>
<ttclass="descname">on_clicked</tt><big>(</big><em>func</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.CheckButtons.on_clicked" title="Permalink to this definition">¶</a></dt>
<dd><p>When the button is clicked, call <em>func</em> with button label</p>
<p>A connection id is returned which can be used to disconnect</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.Cursor">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">Cursor</tt><big>(</big><em>ax</em>, <em>horizOn=True</em>, <em>vertOn=True</em>, <em>useblit=False</em>, <em>**lineprops</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Cursor" title="Permalink to this definition">¶</a></dt>
<ttclass="descname">clear</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Cursor.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>clear the cursor</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.Cursor.onmove">
<ttclass="descname">onmove</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Cursor.onmove" title="Permalink to this definition">¶</a></dt>
<dd><p>on mouse motion draw the cursor if visible</p>
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">HorizontalSpanSelector</tt><big>(</big><em>ax</em>, <em>onselect</em>, <em>**kwargs</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.HorizontalSpanSelector" title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">Lasso</tt><big>(</big><em>ax</em>, <em>xy</em>, <em>callback=None</em>, <em>useblit=True</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Lasso" title="Permalink to this definition">¶</a></dt>
<p>The selected path can be used in conjunction with
<aclass="reference internal" href="path_api.html#matplotlib.path.Path.contains_point" title="matplotlib.path.Path.contains_point"><ttclass="xref py py-func docutils literal"><spanclass="pre">contains_point()</span></tt></a> to select data points
from an image.</p>
<p>Unlike <aclass="reference internal" href="#matplotlib.widgets.LassoSelector" title="matplotlib.widgets.LassoSelector"><ttclass="xref py py-class docutils literal"><spanclass="pre">LassoSelector</span></tt></a>, this must be initialized with a starting
point <ttclass="xref py py-obj docutils literal"><spanclass="pre">xy</span></tt>, and the <aclass="reference internal" href="#matplotlib.widgets.Lasso" title="matplotlib.widgets.Lasso"><ttclass="xref py py-obj docutils literal"><spanclass="pre">Lasso</span></tt></a> events are destroyed upon release.</p>
<dd>Whenever the lasso is released, the <ttclass="xref py py-obj docutils literal"><spanclass="pre">callback</span></tt> function is called and
passed the vertices of the selected path.</dd>
</dl>
<dlclass="method">
<dtid="matplotlib.widgets.Lasso.onmove">
<ttclass="descname">onmove</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Lasso.onmove" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.Lasso.onrelease">
<ttclass="descname">onrelease</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Lasso.onrelease" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.LassoSelector">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">LassoSelector</tt><big>(</big><em>ax</em>, <em>onselect=None</em>, <em>useblit=True</em>, <em>lineprops=None</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LassoSelector" title="Permalink to this definition">¶</a></dt>
<p>The selected path can be used in conjunction with
<aclass="reference internal" href="path_api.html#matplotlib.path.Path.contains_point" title="matplotlib.path.Path.contains_point"><ttclass="xref py py-func docutils literal"><spanclass="pre">contains_point()</span></tt></a> to select
data points from an image.</p>
<p>In contrast to <aclass="reference internal" href="#matplotlib.widgets.Lasso" title="matplotlib.widgets.Lasso"><ttclass="xref py py-class docutils literal"><spanclass="pre">Lasso</span></tt></a>, <aclass="reference internal" href="#matplotlib.widgets.LassoSelector" title="matplotlib.widgets.LassoSelector"><ttclass="xref py py-obj docutils literal"><spanclass="pre">LassoSelector</span></tt></a> is written with an interface
similar to <aclass="reference internal" href="#matplotlib.widgets.RectangleSelector" title="matplotlib.widgets.RectangleSelector"><ttclass="xref py py-class docutils literal"><spanclass="pre">RectangleSelector</span></tt></a> and <aclass="reference internal" href="#matplotlib.widgets.SpanSelector" title="matplotlib.widgets.SpanSelector"><ttclass="xref py py-class docutils literal"><spanclass="pre">SpanSelector</span></tt></a> and will
continue to interact with the axes until disconnected.</p>
<ttclass="descname">ignore</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LassoSelector.ignore" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.LassoSelector.onmove">
<ttclass="descname">onmove</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LassoSelector.onmove" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.LassoSelector.onpress">
<ttclass="descname">onpress</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LassoSelector.onpress" title="Permalink to this definition">¶</a></dt>
<ttclass="descname">onrelease</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LassoSelector.onrelease" title="Permalink to this definition">¶</a></dt>
<ttclass="descname">update_background</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LassoSelector.update_background" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.LockDraw">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">LockDraw</tt><aclass="headerlink" href="#matplotlib.widgets.LockDraw" title="Permalink to this definition">¶</a></dt>
<dd><p>Some widgets, like the cursor, draw onto the canvas, and this is not
desirable under all circumstances, like when the toolbar is in
zoom-to-rect mode and drawing a rectangle. The module level “lock”
allows someone to grab the lock and prevent other widgets from
drawing. Use <ttclass="docutils literal"><spanclass="pre">matplotlib.widgets.lock(someobj)</span></tt> to pr</p>
<dlclass="method">
<dtid="matplotlib.widgets.LockDraw.available">
<ttclass="descname">available</tt><big>(</big><em>o</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LockDraw.available" title="Permalink to this definition">¶</a></dt>
<dd><p>drawing is available to <em>o</em></p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.LockDraw.isowner">
<ttclass="descname">isowner</tt><big>(</big><em>o</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LockDraw.isowner" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if <em>o</em> owns this lock</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.LockDraw.locked">
<ttclass="descname">locked</tt><big>(</big><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LockDraw.locked" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if the lock is currently held by an owner</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.LockDraw.release">
<ttclass="descname">release</tt><big>(</big><em>o</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.LockDraw.release" title="Permalink to this definition">¶</a></dt>
<dd><p>release the lock</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.MultiCursor">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">MultiCursor</tt><big>(</big><em>canvas</em>, <em>axes</em>, <em>useblit=True</em>, <em>horizOn=False</em>, <em>vertOn=True</em>, <em>**lineprops</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.MultiCursor" title="Permalink to this definition">¶</a></dt>
<ttclass="descname">clear</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.MultiCursor.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>clear the cursor</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.MultiCursor.onmove">
<ttclass="descname">onmove</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.MultiCursor.onmove" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.RadioButtons">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">RadioButtons</tt><big>(</big><em>ax</em>, <em>labels</em>, <em>active=0</em>, <em>activecolor='blue'</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RadioButtons" title="Permalink to this definition">¶</a></dt>
<dd>The <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.axes.Axes</span></tt></a> instance the buttons are in</dd>
<dt><em>activecolor</em></dt>
<dd>The color of the button when clicked</dd>
<dt><em>labels</em></dt>
<dd>A list of <aclass="reference internal" href="artist_api.html#matplotlib.text.Text" title="matplotlib.text.Text"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.text.Text</span></tt></a> instances</dd>
<dt><em>circles</em></dt>
<dd>A list of <aclass="reference internal" href="artist_api.html#matplotlib.patches.Circle" title="matplotlib.patches.Circle"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.patches.Circle</span></tt></a> instances</dd>
</dl>
</div></blockquote>
<p>Connect to the RadioButtons with the <aclass="reference internal" href="#matplotlib.widgets.RadioButtons.on_clicked" title="matplotlib.widgets.RadioButtons.on_clicked"><ttclass="xref py py-meth docutils literal"><spanclass="pre">on_clicked()</span></tt></a> method</p>
<p>Add radio buttons to <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.axes.Axes</span></tt></a> instance <em>ax</em></p>
<dlclass="docutils">
<dt><em>labels</em></dt>
<dd>A len(buttons) list of labels as strings</dd>
<dt><em>active</em></dt>
<dd>The index into labels for the button that is active</dd>
<ttclass="descname">disconnect</tt><big>(</big><em>cid</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RadioButtons.disconnect" title="Permalink to this definition">¶</a></dt>
<dd><p>remove the observer with connection id <em>cid</em></p>
<ttclass="descname">on_clicked</tt><big>(</big><em>func</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RadioButtons.on_clicked" title="Permalink to this definition">¶</a></dt>
<dd><p>When the button is clicked, call <em>func</em> with button label</p>
<p>A connection id is returned which can be used to disconnect</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.RectangleSelector">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">RectangleSelector</tt><big>(</big><em>ax</em>, <em>onselect</em>, <em>drawtype='box'</em>, <em>minspanx=None</em>, <em>minspany=None</em>, <em>useblit=False</em>, <em>lineprops=None</em>, <em>rectprops=None</em>, <em>spancoords='data'</em>, <em>button=None</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector" title="Permalink to this definition">¶</a></dt>
<spanclass="k">print</span><spanclass="s">' used button : '</span><spanclass="p">,</span><spanclass="n">eclick</span><spanclass="o">.</span><spanclass="n">button</span>
<p>and clear the drawn box/line. The <ttclass="docutils literal"><spanclass="pre">pos_1</span></tt> and <ttclass="docutils literal"><spanclass="pre">pos_2</span></tt> are
arrays of length 2 containing the x- and y-coordinate.</p>
<p>If <em>minspanx</em> is not <em>None</em> then events smaller than <em>minspanx</em>
in x direction are ignored (it’s the same for y).</p>
<p>The rectangle is drawn with <em>rectprops</em>; default:</p>
<ttclass="descname">get_active</tt><big>(</big><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector.get_active" title="Permalink to this definition">¶</a></dt>
<dd><p>Get status of active mode (boolean variable)</p>
<ttclass="descname">ignore</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector.ignore" title="Permalink to this definition">¶</a></dt>
<dd><p>return <em>True</em> if <em>event</em> should be ignored</p>
<ttclass="descname">onmove</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector.onmove" title="Permalink to this definition">¶</a></dt>
<dd><p>on motion notify event if box/line is wanted</p>
<ttclass="descname">press</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector.press" title="Permalink to this definition">¶</a></dt>
<ttclass="descname">release</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector.release" title="Permalink to this definition">¶</a></dt>
<ttclass="descname">set_active</tt><big>(</big><em>active</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector.set_active" title="Permalink to this definition">¶</a></dt>
<dd><p>Use this to activate / deactivate the RectangleSelector
from your program with an boolean parameter <em>active</em>.</p>
<ttclass="descname">update</tt><big>(</big><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector.update" title="Permalink to this definition">¶</a></dt>
<dd><p>draw using newfangled blit or oldfangled draw depending on
<ttclass="descname">update_background</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.RectangleSelector.update_background" title="Permalink to this definition">¶</a></dt>
<dd><p>force an update of the background</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.Slider">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">Slider</tt><big>(</big><em>ax</em>, <em>label</em>, <em>valmin</em>, <em>valmax</em>, <em>valinit=0.5</em>, <em>valfmt='%1.2f'</em>, <em>closedmin=True</em>, <em>closedmax=True</em>, <em>slidermin=None</em>, <em>slidermax=None</em>, <em>dragging=True</em>, <em>**kwargs</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Slider" title="Permalink to this definition">¶</a></dt>
<p><em>closedmin</em> : whether the slider is closed on the minimum</p>
<p><em>closedmax</em> : whether the slider is closed on the maximum</p>
<dlclass="docutils">
<dt><em>slidermin</em><spanclass="classifier-delimiter">:</span><spanclass="classifier">another slider - if not <em>None</em>, this slider must be</span></dt>
<dd>greater than <em>slidermin</em></dd>
<dt><em>slidermax</em><spanclass="classifier-delimiter">:</span><spanclass="classifier">another slider - if not <em>None</em>, this slider must be</span></dt>
<dd>less than <em>slidermax</em></dd>
</dl>
<pclass="last"><em>dragging</em> : allow for mouse dragging on slider</p>
</dd>
</dl>
<p>Call <aclass="reference internal" href="#matplotlib.widgets.Slider.on_changed" title="matplotlib.widgets.Slider.on_changed"><ttclass="xref py py-meth docutils literal"><spanclass="pre">on_changed()</span></tt></a> to connect to the slider event</p>
<p>Create a slider from <em>valmin</em> to <em>valmax</em> in axes <em>ax</em></p>
<dlclass="docutils">
<dt><em>valinit</em></dt>
<dd>The slider initial position</dd>
<dt><em>label</em></dt>
<dd>The slider label</dd>
<dt><em>valfmt</em></dt>
<dd>Used to format the slider value</dd>
<dt><em>closedmin</em> and <em>closedmax</em></dt>
<dd>Indicate whether the slider interval is closed</dd>
<dt><em>slidermin</em> and <em>slidermax</em></dt>
<dd>Used to constrain the value of this slider to the values
of other sliders.</dd>
</dl>
<p>additional kwargs are passed on to <ttclass="docutils literal"><spanclass="pre">self.poly</span></tt> which is the
<aclass="reference internal" href="artist_api.html#matplotlib.patches.Rectangle" title="matplotlib.patches.Rectangle"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.patches.Rectangle</span></tt></a> which draws the slider
knob. See the <aclass="reference internal" href="artist_api.html#matplotlib.patches.Rectangle" title="matplotlib.patches.Rectangle"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.patches.Rectangle</span></tt></a> documentation
<ttclass="descname">disconnect</tt><big>(</big><em>cid</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Slider.disconnect" title="Permalink to this definition">¶</a></dt>
<dd><p>remove the observer with connection id <em>cid</em></p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.Slider.on_changed">
<ttclass="descname">on_changed</tt><big>(</big><em>func</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Slider.on_changed" title="Permalink to this definition">¶</a></dt>
<dd><p>When the slider value is changed, call <em>func</em> with the new
slider position</p>
<p>A connection id is returned which can be used to disconnect</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.Slider.reset">
<ttclass="descname">reset</tt><big>(</big><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Slider.reset" title="Permalink to this definition">¶</a></dt>
<dd><p>reset the slider to the initial value if needed</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.Slider.set_val">
<ttclass="descname">set_val</tt><big>(</big><em>val</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.Slider.set_val" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.SpanSelector">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">SpanSelector</tt><big>(</big><em>ax</em>, <em>onselect</em>, <em>direction</em>, <em>minspan=None</em>, <em>useblit=False</em>, <em>rectprops=None</em>, <em>onmove_callback=None</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SpanSelector" title="Permalink to this definition">¶</a></dt>
<p>Set the visible attribute to <em>False</em> if you want to turn off
the functionality of the span selector</p>
<dlclass="method">
<dtid="matplotlib.widgets.SpanSelector.ignore">
<ttclass="descname">ignore</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SpanSelector.ignore" title="Permalink to this definition">¶</a></dt>
<dd><p>return <em>True</em> if <em>event</em> should be ignored</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.SpanSelector.new_axes">
<ttclass="descname">new_axes</tt><big>(</big><em>ax</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SpanSelector.new_axes" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.SpanSelector.onmove">
<ttclass="descname">onmove</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SpanSelector.onmove" title="Permalink to this definition">¶</a></dt>
<dd><p>on motion notify event</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.SpanSelector.press">
<ttclass="descname">press</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SpanSelector.press" title="Permalink to this definition">¶</a></dt>
<dd><p>on button press event</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.SpanSelector.release">
<ttclass="descname">release</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SpanSelector.release" title="Permalink to this definition">¶</a></dt>
<dd><p>on button release event</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.SpanSelector.update">
<ttclass="descname">update</tt><big>(</big><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SpanSelector.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw using newfangled blit or oldfangled draw depending
<ttclass="descname">update_background</tt><big>(</big><em>event</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SpanSelector.update_background" title="Permalink to this definition">¶</a></dt>
<dd><p>force an update of the background</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.SubplotTool">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">SubplotTool</tt><big>(</big><em>targetfig</em>, <em>toolfig</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SubplotTool" title="Permalink to this definition">¶</a></dt>
<p>A tool to adjust to subplot params of a <aclass="reference internal" href="figure_api.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.figure.Figure</span></tt></a></p>
<dlclass="docutils">
<dt><em>targetfig</em></dt>
<dd>The figure instance to adjust</dd>
<dt><em>toolfig</em></dt>
<dd>The figure instance to embed the subplot tool into. If
None, a default figure will be created. If you are using
<ttclass="descname">funcbottom</tt><big>(</big><em>val</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SubplotTool.funcbottom" title="Permalink to this definition">¶</a></dt>
<ttclass="descname">funchspace</tt><big>(</big><em>val</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SubplotTool.funchspace" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.SubplotTool.funcleft">
<ttclass="descname">funcleft</tt><big>(</big><em>val</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SubplotTool.funcleft" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.SubplotTool.funcright">
<ttclass="descname">funcright</tt><big>(</big><em>val</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SubplotTool.funcright" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.widgets.SubplotTool.functop">
<ttclass="descname">functop</tt><big>(</big><em>val</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SubplotTool.functop" title="Permalink to this definition">¶</a></dt>
<ttclass="descname">funcwspace</tt><big>(</big><em>val</em><big>)</big><aclass="headerlink" href="#matplotlib.widgets.SubplotTool.funcwspace" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.widgets.Widget">
<emclass="property">class </em><ttclass="descclassname">matplotlib.widgets.</tt><ttclass="descname">Widget</tt><aclass="headerlink" href="#matplotlib.widgets.Widget" title="Permalink to this definition">¶</a></dt>
<p>Abstract base class for GUI neutral widgets</p>
<dlclass="attribute">
<dtid="matplotlib.widgets.Widget.drawon">
<ttclass="descname">drawon</tt><emclass="property"> = True</em><aclass="headerlink" href="#matplotlib.widgets.Widget.drawon" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="matplotlib.widgets.Widget.eventson">
<ttclass="descname">eventson</tt><emclass="property"> = True</em><aclass="headerlink" href="#matplotlib.widgets.Widget.eventson" title="Permalink to this definition">¶</a></dt>