doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
classmatplotlib.widgets.Button(ax, label, image=None, color='0.85', hovercolor='0.95')[source]
Bases: matplotlib.widgets.AxesWidget A GUI neutral button. For the button to remain responsive you must keep a reference to it. Call on_clicked to connect to the button. Attributes
ax
The matplotlib.axes.Axes the button... | matplotlib.widgets_api#matplotlib.widgets.Button |
disconnect(cid)[source]
Remove the callback function with connection id cid. | matplotlib.widgets_api#matplotlib.widgets.Button.disconnect |
on_clicked(func)[source]
Connect the callback function func to button click events. Returns a connection id, which can be used to disconnect the callback. | matplotlib.widgets_api#matplotlib.widgets.Button.on_clicked |
classmatplotlib.widgets.CheckButtons(ax, labels, actives=None)[source]
Bases: matplotlib.widgets.AxesWidget A GUI neutral set of check buttons. For the check buttons to remain responsive you must keep a reference to this object. Connect to the CheckButtons with the on_clicked method. Attributes
axAxes
The paren... | matplotlib.widgets_api#matplotlib.widgets.CheckButtons |
disconnect(cid)[source]
Remove the observer with connection id cid. | matplotlib.widgets_api#matplotlib.widgets.CheckButtons.disconnect |
get_status()[source]
Return a tuple of the status (True/False) of all of the check buttons. | matplotlib.widgets_api#matplotlib.widgets.CheckButtons.get_status |
on_clicked(func)[source]
Connect the callback function func to button click events. Returns a connection id, which can be used to disconnect the callback. | matplotlib.widgets_api#matplotlib.widgets.CheckButtons.on_clicked |
set_active(index)[source]
Toggle (activate or deactivate) a check button by index. Callbacks will be triggered if eventson is True. Parameters
indexint
Index of the check button to toggle. Raises
ValueError
If index is invalid. | matplotlib.widgets_api#matplotlib.widgets.CheckButtons.set_active |
classmatplotlib.widgets.Cursor(ax, horizOn=True, vertOn=True, useblit=False, **lineprops)[source]
Bases: matplotlib.widgets.AxesWidget A crosshair cursor that spans the axes and moves with mouse cursor. For the cursor to remain responsive you must keep a reference to it. Parameters
axmatplotlib.axes.Axes
The Ax... | matplotlib.widgets_api#matplotlib.widgets.Cursor |
clear(event)[source]
Internal event handler to clear the cursor. | matplotlib.widgets_api#matplotlib.widgets.Cursor.clear |
onmove(event)[source]
Internal event handler to draw the cursor when the mouse moves. | matplotlib.widgets_api#matplotlib.widgets.Cursor.onmove |
classmatplotlib.widgets.EllipseSelector(ax, onselect, drawtype=<deprecated parameter>, minspanx=0, minspany=0, useblit=False, lineprops=<deprecated parameter>, props=None, spancoords='data', button=None, grab_range=10, handle_props=None, interactive=False, state_modifier_keys=None, drag_from_anywhere=False, ignore_even... | matplotlib.widgets_api#matplotlib.widgets.EllipseSelector |
classmatplotlib.widgets.Lasso(ax, xy, callback=None, useblit=True)[source]
Bases: matplotlib.widgets.AxesWidget Selection curve of an arbitrary shape. The selected path can be used in conjunction with contains_point to select data points from an image. Unlike LassoSelector, this must be initialized with a starting po... | matplotlib.widgets_api#matplotlib.widgets.Lasso |
onmove(event)[source] | matplotlib.widgets_api#matplotlib.widgets.Lasso.onmove |
onrelease(event)[source] | matplotlib.widgets_api#matplotlib.widgets.Lasso.onrelease |
classmatplotlib.widgets.LassoSelector(ax, onselect=None, useblit=True, props=None, button=None)[source]
Bases: matplotlib.widgets._SelectorWidget Selection curve of an arbitrary shape. For the selector to remain responsive you must keep a reference to it. The selected path can be used in conjunction with contains_poi... | matplotlib.widgets_api#matplotlib.widgets.LassoSelector |
onpress(event)[source]
[Deprecated] Notes Deprecated since version 3.5: | matplotlib.widgets_api#matplotlib.widgets.LassoSelector.onpress |
onrelease(event)[source]
[Deprecated] Notes Deprecated since version 3.5: | matplotlib.widgets_api#matplotlib.widgets.LassoSelector.onrelease |
classmatplotlib.widgets.LockDraw[source]
Bases: object 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. To avoid this, a widget can acquire a canvas' lock with canvas.widgetlock(widget) before... | matplotlib.widgets_api#matplotlib.widgets.LockDraw |
available(o)[source]
Return whether drawing is available to o. | matplotlib.widgets_api#matplotlib.widgets.LockDraw.available |
isowner(o)[source]
Return whether o owns this lock. | matplotlib.widgets_api#matplotlib.widgets.LockDraw.isowner |
locked()[source]
Return whether the lock is currently held by an owner. | matplotlib.widgets_api#matplotlib.widgets.LockDraw.locked |
release(o)[source]
Release the lock from o. | matplotlib.widgets_api#matplotlib.widgets.LockDraw.release |
classmatplotlib.widgets.MultiCursor(canvas, axes, useblit=True, horizOn=False, vertOn=True, **lineprops)[source]
Bases: matplotlib.widgets.Widget Provide a vertical (default) and/or horizontal line cursor shared between multiple axes. For the cursor to remain responsive you must keep a reference to it. Parameters
... | matplotlib.widgets_api#matplotlib.widgets.MultiCursor |
clear(event)[source]
Clear the cursor. | matplotlib.widgets_api#matplotlib.widgets.MultiCursor.clear |
connect()[source]
Connect events. | matplotlib.widgets_api#matplotlib.widgets.MultiCursor.connect |
disconnect()[source]
Disconnect events. | matplotlib.widgets_api#matplotlib.widgets.MultiCursor.disconnect |
onmove(event)[source] | matplotlib.widgets_api#matplotlib.widgets.MultiCursor.onmove |
classmatplotlib.widgets.PolygonSelector(ax, onselect, useblit=False, props=None, handle_props=None, grab_range=10)[source]
Bases: matplotlib.widgets._SelectorWidget Select a polygon region of an axes. Place vertices with each mouse click, and make the selection by completing the polygon (clicking on the first vertex)... | matplotlib.widgets_api#matplotlib.widgets.PolygonSelector |
onmove(event)[source]
Cursor move event handler and validator. | matplotlib.widgets_api#matplotlib.widgets.PolygonSelector.onmove |
classmatplotlib.widgets.RadioButtons(ax, labels, active=0, activecolor='blue')[source]
Bases: matplotlib.widgets.AxesWidget A GUI neutral radio button. For the buttons to remain responsive you must keep a reference to this object. Connect to the RadioButtons with the on_clicked method. Attributes
axAxes
The par... | matplotlib.widgets_api#matplotlib.widgets.RadioButtons |
disconnect(cid)[source]
Remove the observer with connection id cid. | matplotlib.widgets_api#matplotlib.widgets.RadioButtons.disconnect |
on_clicked(func)[source]
Connect the callback function func to button click events. Returns a connection id, which can be used to disconnect the callback. | matplotlib.widgets_api#matplotlib.widgets.RadioButtons.on_clicked |
set_active(index)[source]
Select button with number index. Callbacks will be triggered if eventson is True. | matplotlib.widgets_api#matplotlib.widgets.RadioButtons.set_active |
classmatplotlib.widgets.RangeSlider(ax, label, valmin, valmax, valinit=None, valfmt=None, closedmin=True, closedmax=True, dragging=True, valstep=None, orientation='horizontal', track_color='lightgrey', handle_style=None, **kwargs)[source]
Bases: matplotlib.widgets.SliderBase A slider representing a range of floating ... | matplotlib.widgets_api#matplotlib.widgets.RangeSlider |
on_changed(func)[source]
Connect func as callback function to changes of the slider value. Parameters
funccallable
Function to call when slider is changed. The function must accept a numpy array with shape (2,) as its argument. Returns
int
Connection id (which can be used to disconnect func). | matplotlib.widgets_api#matplotlib.widgets.RangeSlider.on_changed |
set_max(max)[source]
Set the lower value of the slider to max. Parameters
maxfloat | matplotlib.widgets_api#matplotlib.widgets.RangeSlider.set_max |
set_min(min)[source]
Set the lower value of the slider to min. Parameters
minfloat | matplotlib.widgets_api#matplotlib.widgets.RangeSlider.set_min |
set_val(val)[source]
Set slider value to val. Parameters
valtuple or array-like of float | matplotlib.widgets_api#matplotlib.widgets.RangeSlider.set_val |
classmatplotlib.widgets.RectangleSelector(ax, onselect, drawtype=<deprecated parameter>, minspanx=0, minspany=0, useblit=False, lineprops=<deprecated parameter>, props=None, spancoords='data', button=None, grab_range=10, handle_props=None, interactive=False, state_modifier_keys=None, drag_from_anywhere=False, ignore_ev... | matplotlib.widgets_api#matplotlib.widgets.RectangleSelector |
classmatplotlib.widgets.Slider(ax, label, valmin, valmax, valinit=0.5, valfmt=None, closedmin=True, closedmax=True, slidermin=None, slidermax=None, dragging=True, valstep=None, orientation='horizontal', *, initcolor='r', track_color='lightgrey', handle_style=None, **kwargs)[source]
Bases: matplotlib.widgets.SliderBas... | matplotlib.widgets_api#matplotlib.widgets.Slider |
on_changed(func)[source]
Connect func as callback function to changes of the slider value. Parameters
funccallable
Function to call when slider is changed. The function must accept a single float as its arguments. Returns
int
Connection id (which can be used to disconnect func). | matplotlib.widgets_api#matplotlib.widgets.Slider.on_changed |
set_val(val)[source]
Set slider value to val. Parameters
valfloat | matplotlib.widgets_api#matplotlib.widgets.Slider.set_val |
classmatplotlib.widgets.SliderBase(ax, orientation, closedmin, closedmax, valmin, valmax, valfmt, dragging, valstep)[source]
Bases: matplotlib.widgets.AxesWidget The base class for constructing Slider widgets. Not intended for direct usage. For the slider to remain responsive you must maintain a reference to it. di... | matplotlib.widgets_api#matplotlib.widgets.SliderBase |
disconnect(cid)[source]
Remove the observer with connection id cid. Parameters
cidint
Connection id of the observer to be removed. | matplotlib.widgets_api#matplotlib.widgets.SliderBase.disconnect |
reset()[source]
Reset the slider to the initial value. | matplotlib.widgets_api#matplotlib.widgets.SliderBase.reset |
classmatplotlib.widgets.SpanSelector(ax, onselect, direction, minspan=0, useblit=False, props=None, onmove_callback=None, interactive=False, button=None, handle_props=None, grab_range=10, drag_from_anywhere=False, ignore_event_outside=False)[source]
Bases: matplotlib.widgets._SelectorWidget Visually select a min/max ... | matplotlib.widgets_api#matplotlib.widgets.SpanSelector |
connect_default_events()[source]
Connect the major canvas events to methods. | matplotlib.widgets_api#matplotlib.widgets.SpanSelector.connect_default_events |
new_axes(ax)[source]
Set SpanSelector to operate on a new Axes. | matplotlib.widgets_api#matplotlib.widgets.SpanSelector.new_axes |
classmatplotlib.widgets.SubplotTool(targetfig, toolfig)[source]
Bases: matplotlib.widgets.Widget A tool to adjust the subplot params of a matplotlib.figure.Figure. Parameters
targetfigFigure
The figure instance to adjust.
toolfigFigure
The figure instance to embed the subplot tool into. | matplotlib.widgets_api#matplotlib.widgets.SubplotTool |
classmatplotlib.widgets.TextBox(ax, label, initial='', color='.95', hovercolor='1', label_pad=0.01, textalignment='left')[source]
Bases: matplotlib.widgets.AxesWidget A GUI neutral text input box. For the text box to remain responsive you must keep a reference to it. Call on_text_change to be updated whenever the tex... | matplotlib.widgets_api#matplotlib.widgets.TextBox |
begin_typing(x)[source] | matplotlib.widgets_api#matplotlib.widgets.TextBox.begin_typing |
disconnect(cid)[source]
Remove the observer with connection id cid. | matplotlib.widgets_api#matplotlib.widgets.TextBox.disconnect |
on_submit(func)[source]
When the user hits enter or leaves the submission box, call this func with event. A connection id is returned which can be used to disconnect. | matplotlib.widgets_api#matplotlib.widgets.TextBox.on_submit |
on_text_change(func)[source]
When the text changes, call this func with event. A connection id is returned which can be used to disconnect. | matplotlib.widgets_api#matplotlib.widgets.TextBox.on_text_change |
position_cursor(x)[source] | matplotlib.widgets_api#matplotlib.widgets.TextBox.position_cursor |
set_val(val)[source] | matplotlib.widgets_api#matplotlib.widgets.TextBox.set_val |
stop_typing()[source] | matplotlib.widgets_api#matplotlib.widgets.TextBox.stop_typing |
classmatplotlib.widgets.ToolHandles(ax, x, y, marker='o', marker_props=None, useblit=True)[source]
Bases: object Control handles for canvas tools. Parameters
axmatplotlib.axes.Axes
Matplotlib axes where tool handles are displayed.
x, y1D arrays
Coordinates of control handles.
markerstr, default: 'o'
Sha... | matplotlib.widgets_api#matplotlib.widgets.ToolHandles |
closest(x, y)[source]
Return index and pixel distance to closest index. | matplotlib.widgets_api#matplotlib.widgets.ToolHandles.closest |
set_animated(val)[source] | matplotlib.widgets_api#matplotlib.widgets.ToolHandles.set_animated |
set_data(pts, y=None)[source]
Set x and y positions of handles. | matplotlib.widgets_api#matplotlib.widgets.ToolHandles.set_data |
set_visible(val)[source] | matplotlib.widgets_api#matplotlib.widgets.ToolHandles.set_visible |
classmatplotlib.widgets.ToolLineHandles(ax, positions, direction, line_props=None, useblit=True)[source]
Bases: object Control handles for canvas tools. Parameters
axmatplotlib.axes.Axes
Matplotlib axes where tool handles are displayed.
positions1D array
Positions of handles in data coordinates.
direction... | matplotlib.widgets_api#matplotlib.widgets.ToolLineHandles |
closest(x, y)[source]
Return index and pixel distance to closest handle. Parameters
x, yfloat
x, y position from which the distance will be calculated to determinate the closest handle Returns
index, distanceindex of the handle and its distance from
position x, y | matplotlib.widgets_api#matplotlib.widgets.ToolLineHandles.closest |
remove()[source]
Remove the handles artist from the figure. | matplotlib.widgets_api#matplotlib.widgets.ToolLineHandles.remove |
set_animated(value)[source]
Set the animated state of the handles artist. | matplotlib.widgets_api#matplotlib.widgets.ToolLineHandles.set_animated |
set_data(positions)[source]
Set x or y positions of handles, depending if the lines are vertical of horizontal. Parameters
positionstuple of length 2
Set the positions of the handle in data coordinates | matplotlib.widgets_api#matplotlib.widgets.ToolLineHandles.set_data |
set_visible(value)[source]
Set the visibility state of the handles artist. | matplotlib.widgets_api#matplotlib.widgets.ToolLineHandles.set_visible |
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 whether event should be ignored. This method shou... | matplotlib.widgets_api#matplotlib.widgets.Widget |
drawon=True | matplotlib.widgets_api#matplotlib.widgets.Widget.drawon |
eventson=True | matplotlib.widgets_api#matplotlib.widgets.Widget.eventson |
get_active()[source]
Get whether the widget is active. | matplotlib.widgets_api#matplotlib.widgets.Widget.get_active |
ignore(event)[source]
Return whether event should be ignored. This method should be called at the beginning of any event callback. | matplotlib.widgets_api#matplotlib.widgets.Widget.ignore |
set_active(active)[source]
Set whether the widget is active. | matplotlib.widgets_api#matplotlib.widgets.Widget.set_active |
flask.abort(status, *args, **kwargs)
Raises an HTTPException for the given status code or WSGI application. If a status code is given, it will be looked up in the list of exceptions and will raise that exception. If passed a WSGI application, it will wrap it in a proxy WSGI exception and raise that: abort(404) # 404... | flask.api.index#flask.abort |
flask.after_this_request(f)
Executes a function after this request. This is useful to modify response objects. The function is passed the response object and has to return the same or a new one. Example: @app.route('/')
def index():
@after_this_request
def add_header(response):
response.headers['X-Foo... | flask.api.index#flask.after_this_request |
class flask.ctx.AppContext(app)
The application context binds an application object implicitly to the current thread or greenlet, similar to how the RequestContext binds request information. The application context is also implicitly created if a request context is created but the application is not on top of the ind... | flask.api.index#flask.ctx.AppContext |
pop(exc=<object object>)
Pops the app context. Parameters
exc (Optional[BaseException]) – Return type
None | flask.api.index#flask.ctx.AppContext.pop |
push()
Binds the app context to the current context. Return type
None | flask.api.index#flask.ctx.AppContext.push |
class flask.cli.AppGroup(name=None, commands=None, **attrs)
This works similar to a regular click Group but it changes the behavior of the command() decorator so that it automatically wraps the functions in with_appcontext(). Not to be confused with FlaskGroup. Parameters
name (Optional[str]) –
commands (Option... | flask.api.index#flask.cli.AppGroup |
command(*args, **kwargs)
This works exactly like the method of the same name on a regular click.Group but it wraps callbacks in with_appcontext() unless it’s disabled by passing with_appcontext=False. | flask.api.index#flask.cli.AppGroup.command |
group(*args, **kwargs)
This works exactly like the method of the same name on a regular click.Group but it defaults the group class to AppGroup. | flask.api.index#flask.cli.AppGroup.group |
APPLICATION_ROOT
Inform the application what path it is mounted under by the application / web server. This is used for generating URLs outside the context of a request (inside a request, the dispatcher is responsible for setting SCRIPT_NAME instead; see Application Dispatching for examples of dispatch configuration)... | flask.config.index#APPLICATION_ROOT |
ASGI If you’d like to use an ASGI server you will need to utilise WSGI to ASGI middleware. The asgiref [WsgiToAsgi](https://github.com/django/asgiref#wsgi-to-asgi-adapter) adapter is recommended as it integrates with the event loop used for Flask’s Using async and await support. You can use the adapter by wrapping the ... | flask.deploying.asgi.index |
class flask.Blueprint(name, import_name, static_folder=None, static_url_path=None, template_folder=None, url_prefix=None, subdomain=None, url_defaults=None, root_path=None, cli_group=<object object>)
Represents a blueprint, a collection of routes and other app-related functions that can be registered on a real applic... | flask.api.index#flask.Blueprint |
add_app_template_filter(f, name=None)
Register a custom template filter, available application wide. Like Flask.add_template_filter() but for a blueprint. Works exactly like the app_template_filter() decorator. Parameters
name (Optional[str]) – the optional name of the filter, otherwise the function name will be ... | flask.api.index#flask.Blueprint.add_app_template_filter |
add_app_template_global(f, name=None)
Register a custom template global, available application wide. Like Flask.add_template_global() but for a blueprint. Works exactly like the app_template_global() decorator. Changelog New in version 0.10. Parameters
name (Optional[str]) – the optional name of the global, oth... | flask.api.index#flask.Blueprint.add_app_template_global |
add_app_template_test(f, name=None)
Register a custom template test, available application wide. Like Flask.add_template_test() but for a blueprint. Works exactly like the app_template_test() decorator. Changelog New in version 0.10. Parameters
name (Optional[str]) – the optional name of the test, otherwise the... | flask.api.index#flask.Blueprint.add_app_template_test |
add_url_rule(rule, endpoint=None, view_func=None, **options)
Like Flask.add_url_rule() but for a blueprint. The endpoint for the url_for() function is prefixed with the name of the blueprint. Parameters
rule (str) –
endpoint (Optional[str]) –
view_func (Optional[Callable]) –
options (Any) – Return type
... | flask.api.index#flask.Blueprint.add_url_rule |
after_app_request(f)
Like Flask.after_request() but for a blueprint. Such a function is executed after each request, even if outside of the blueprint. Parameters
f (Callable[[Response], Response]) – Return type
Callable[[Response], Response] | flask.api.index#flask.Blueprint.after_app_request |
after_request(f)
Register a function to run after each request to this object. The function is called with the response object, and must return a response object. This allows the functions to modify or replace the response before it is sent. If a function raises an exception, any remaining after_request functions wil... | flask.api.index#flask.Blueprint.after_request |
after_request_funcs: t.Dict[AppOrBlueprintKey, t.List[AfterRequestCallable]]
A data structure of functions to call at the end of each request, in the format {scope: [functions]}. The scope key is the name of a blueprint the functions are active for, or None for all requests. To register a function, use the after_requ... | flask.api.index#flask.Blueprint.after_request_funcs |
app_context_processor(f)
Like Flask.context_processor() but for a blueprint. Such a function is executed each request, even if outside of the blueprint. Parameters
f (Callable[[], Dict[str, Any]]) – Return type
Callable[[], Dict[str, Any]] | flask.api.index#flask.Blueprint.app_context_processor |
app_errorhandler(code)
Like Flask.errorhandler() but for a blueprint. This handler is used for all requests, even if outside of the blueprint. Parameters
code (Union[Type[Exception], int]) – Return type
Callable | flask.api.index#flask.Blueprint.app_errorhandler |
app_template_filter(name=None)
Register a custom template filter, available application wide. Like Flask.template_filter() but for a blueprint. Parameters
name (Optional[str]) – the optional name of the filter, otherwise the function name will be used. Return type
Callable | flask.api.index#flask.Blueprint.app_template_filter |
app_template_global(name=None)
Register a custom template global, available application wide. Like Flask.template_global() but for a blueprint. Changelog New in version 0.10. Parameters
name (Optional[str]) – the optional name of the global, otherwise the function name will be used. Return type
Callable | flask.api.index#flask.Blueprint.app_template_global |
app_template_test(name=None)
Register a custom template test, available application wide. Like Flask.template_test() but for a blueprint. Changelog New in version 0.10. Parameters
name (Optional[str]) – the optional name of the test, otherwise the function name will be used. Return type
Callable | flask.api.index#flask.Blueprint.app_template_test |
app_url_defaults(f)
Same as url_defaults() but application wide. Parameters
f (Callable[[str, dict], None]) – Return type
Callable[[str, dict], None] | flask.api.index#flask.Blueprint.app_url_defaults |
app_url_value_preprocessor(f)
Same as url_value_preprocessor() but application wide. Parameters
f (Callable[[Optional[str], Optional[dict]], None]) – Return type
Callable[[Optional[str], Optional[dict]], None] | flask.api.index#flask.Blueprint.app_url_value_preprocessor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.