Abstract base classes define the primitives for Tools. These tools are used by matplotlib.backend_managers.ToolManager
ToolBase
Simple stateless tool
ToolToggleBase
Tool that has two states, only one Toggle tool can be active at any given time for the same matplotlib.backend_managers.ToolManager
Bases: matplotlib.backend_tools.ToolToggleBase
Base Tool to toggle between linear and logarithmic.
Disable the toggle tool.
trigger
call this method when toggled
is True.
This can happen in different circumstances.
matplotlib.backend_managers.ToolManager.trigger_tool
.ToolToggleBase
derived tool is triggered (from the same ToolManager
).Bases: matplotlib.backend_tools.ToolBase
Base tool for the configuration of subplots.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
Bases: enum.IntEnum
Backend-independent cursor types.
Bases: matplotlib.backend_tools.ToolBase
Draw and remove a rubberband.
Draw rubberband.
This method must get implemented per backend.
Remove rubberband.
This method should get implemented per backend.
Call draw_rubberband
or remove_rubberband
based on data.
Bases: matplotlib.backend_tools.ToolBase
Base tool for figure saving.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
Bases: matplotlib.backend_tools.ToolBase
Change to the current cursor while inaxes.
This tool, keeps track of all ToolToggleBase
derived tools, and calls set_cursor
when a tool gets triggered.
[Deprecated] Set the cursor.
Deprecated since version 3.5.
Bases: matplotlib.backend_tools.ViewsPositionsBase
Move back up the view limits stack.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
Bases: object
Base tool class.
A base tool, only implements trigger
method or no method at all. The tool is instantiated by matplotlib.backend_managers.ToolManager
.
The canvas of the figure affected by this tool, or None.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Destroy the tool.
This method is called by ToolManager.remove_tool
.
The Figure affected by this tool, or None.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
The tool id (str, must be unique among tools of a tool manager).
The ToolManager
that controls this tool.
Called when this tool gets used.
This method is called by ToolManager.trigger_tool
.
Event
The canvas event that caused this tool to be called.
Object that requested the tool to be triggered.
Extra data.
Bases: matplotlib.backend_tools.ToolBase
Tool to copy the figure to the clipboard.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Called when this tool gets used.
This method is called by ToolManager.trigger_tool
.
Event
The canvas event that caused this tool to be called.
Object that requested the tool to be triggered.
Extra data.
Bases: matplotlib.backend_tools.ToolBase
Send message with the current pointer position.
This tool runs in the background reporting the position of the cursor.
Bases: matplotlib.backend_tools.ViewsPositionsBase
Move forward in the view lim stack.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
Bases: matplotlib.backend_tools.ToolToggleBase
Tool to toggle full screen.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Disable the toggle tool.
trigger
call this method when toggled
is True.
This can happen in different circumstances.
matplotlib.backend_managers.ToolManager.trigger_tool
.ToolToggleBase
derived tool is triggered (from the same ToolManager
).Enable the toggle tool.
trigger
calls this method when toggled
is False.
Bases: matplotlib.backend_tools.ToolBase
Tool to toggle the major grids of the figure.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Called when this tool gets used.
This method is called by ToolManager.trigger_tool
.
Event
The canvas event that caused this tool to be called.
Object that requested the tool to be triggered.
Extra data.
Bases: matplotlib.backend_tools.ToolBase
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Convert a shortcut string from the notation used in rc config to the standard notation for displaying shortcuts, e.g. 'ctrl+a' -> 'Ctrl+A'.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
Bases: matplotlib.backend_tools.ViewsPositionsBase
Restore the original view limits.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
Bases: matplotlib.backend_tools.ToolBase
Tool to toggle the major and minor grids of the figure.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Called when this tool gets used.
This method is called by ToolManager.trigger_tool
.
Event
The canvas event that caused this tool to be called.
Object that requested the tool to be triggered.
Extra data.
Bases: matplotlib.backend_tools.ZoomPanBase
Pan axes with left mouse, zoom with right.
Cursor to use when the tool is active.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
Attribute to group 'radio' like tools (mutually exclusive).
str
that identifies the group or None if not belonging to a group.
Bases: matplotlib.backend_tools.ToolBase
Tool to call the figure manager destroy method.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Called when this tool gets used.
This method is called by ToolManager.trigger_tool
.
Event
The canvas event that caused this tool to be called.
Object that requested the tool to be triggered.
Extra data.
Bases: matplotlib.backend_tools.ToolBase
Tool to call the figure manager destroy method.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Called when this tool gets used.
This method is called by ToolManager.trigger_tool
.
Event
The canvas event that caused this tool to be called.
Object that requested the tool to be triggered.
Extra data.
Bases: matplotlib.backend_tools.ToolBase
Toggleable tool.
Every time it is triggered, it switches between enable and disable.
Variable length argument to be used by the Tool.
toggled
if present and True, sets the initial state of the Tool Arbitrary keyword arguments to be consumed by the Tool
Cursor to use when the tool is active.
Default of toggled state.
Disable the toggle tool.
trigger
call this method when toggled
is True.
This can happen in different circumstances.
matplotlib.backend_managers.ToolManager.trigger_tool
.ToolToggleBase
derived tool is triggered (from the same ToolManager
).Attribute to group 'radio' like tools (mutually exclusive).
str
that identifies the group or None if not belonging to a group.
State of the toggled tool.
Bases: matplotlib.backend_tools.ToolBase
Auxiliary Tool to handle changes in views and positions.
Runs in the background and should get used by all the tools that need to access the figure's history of views and positions, e.g.
Add the current figure to the stack of views and positions.
Back one step in the stack of views and positions.
Reset the axes stack.
Forward one step in the stack of views and positions.
Recall the first view and position from the stack.
Push the current view limits and position onto their respective stacks.
Make sure that self.home_views
has an entry for all axes present in the figure.
Update the view limits and position for each axes from the current stack position. If any axes are present in the figure that aren't in the current stack position, use the home view limits for those axes and don't update any positions.
Bases: matplotlib.backend_tools.AxisScaleBase
Tool to toggle between linear and logarithmic scales on the X axis.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Bases: matplotlib.backend_tools.AxisScaleBase
Tool to toggle between linear and logarithmic scales on the Y axis.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Bases: matplotlib.backend_tools.ZoomPanBase
A Tool for zooming using a rectangle selector.
Cursor to use when the tool is active.
Keymap to associate with this tool.
list[str]
: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas
.
Description of the Tool.
str
: Tooltip used if the Tool is included in a Toolbar.
Filename of the image.
str
: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
Attribute to group 'radio' like tools (mutually exclusive).
str
that identifies the group or None if not belonging to a group.
Bases: matplotlib.backend_tools.ToolBase
Base class for ToolHome
, ToolBack
and ToolForward
.
Called when this tool gets used.
This method is called by ToolManager.trigger_tool
.
Event
The canvas event that caused this tool to be called.
Object that requested the tool to be triggered.
Extra data.
Bases: matplotlib.backend_tools.ToolToggleBase
Base class for ToolZoom
and ToolPan
.
Release the canvas and disconnect press/release events.
Connect press/release events and lock the canvas.
Add multiple tools to the container.
backend_bases.ToolContainerBase
object that will get the tools added.
List in the form [[group1, [tool1, tool2 ...]], [group2, [...]]]
where the tools [tool1, tool2, ...]
will display in group1. See add_tool
for details.
Add multiple tools to a ToolManager
.
backend_managers.ToolManager
Manager to which the tools are added.
The tools to add in a {name: tool} dict, see add_tool
for more info.
alias of matplotlib.backend_tools.Cursors
Default tools in the toolbar
Default tools
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/backend_tools_api.html