Bases: object
Event for tool manipulation (add/remove).
Bases: object
Manager for actions triggered by user interactions (key press, toolbar clicks, ...) on a Figure.
Currently toggled tools.
Add tool to ToolManager
.
If successful, adds a new event tool_trigger_{name}
where {name}
is the name of the tool; the event is fired every time the tool is triggered.
Name of the tool, treated as the ID, has to be unique.
Reference to find the class of the Tool to added.
See also
matplotlib.backend_tools.ToolBase
The base class for tools.
args and kwargs get passed directly to the tools constructor.
Canvas managed by FigureManager.
Figure that holds the canvas.
Return the tool object with the given name.
For convenience, this passes tool objects through.
Return the keymap associated with the specified tool.
Name of the Tool.
List of keys associated with the tool.
Emit a ToolManagerMessageEvent
.
Remove tool named name.
Name of the tool.
Bind the given figure to the tools.
Figure
Force tools to update figure.
Connect event with string s to func.
The name of the event. The following events are recognized:
For every tool added a new event is created
Callback function for the toolmanager event with signature:
def func(event: ToolEvent) -> Any
The callback id for the connection. This can be used in toolmanager_disconnect
.
Disconnect callback id cid.
Example usage:
cid = toolmanager.toolmanager_connect('tool_trigger_zoom', onpress) #...later toolmanager.toolmanager_disconnect(cid)
A dict mapping tool name -> controlled tool.
Trigger a tool and emit the tool_trigger_{name}
event.
Name of the tool.
Object that wishes to trigger the tool.
Original Canvas event or None.
Extra data to pass to the tool when triggering.
Set the keymap to associate with the specified tool.
Name of the Tool.
Keys to associate with the tool.
Bases: object
Event carrying messages from toolmanager.
Messages usually get displayed to the user by the toolbar.
Bases: matplotlib.backend_managers.ToolEvent
Event to inform that a tool has been triggered.
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/backend_managers_api.html