matplotlib.widgets.Widget#

classmatplotlib.widgets.Widget[source]#

Bases:object

Abstract base class for GUI neutral widgets.

propertyactive#

Is the widget active?

drawon=True#
eventson=True#
get_active()[source]#

Get whether the widget is active.

ignore(event)[source]#

Return whetherevent should be ignored.

This method should be called at the beginning of any event callback.

set_active(active)[source]#

Set whether the widget is active.

Examples usingmatplotlib.widgets.Widget#

Lasso Demo

Lasso Demo

Annotated cursor

Annotated cursor

Buttons

Buttons

Check buttons

Check buttons

Cursor

Cursor

Multicursor

Multicursor

Select indices from a collection using polygon selector

Select indices from a collection using polygon selector

Polygon Selector

Polygon Selector

Radio Buttons

Radio Buttons

Radio Buttons Grid

Radio Buttons Grid

Image scaling using a RangeSlider

Image scaling using a RangeSlider

Rectangle and ellipse selectors

Rectangle and ellipse selectors

Slider

Slider

Snap sliders to discrete values

Snap sliders to discrete values

Span Selector

Span Selector

Textbox

Textbox