<divid="unreleased-message"> You are reading an old version of the documentation (v3.2.0). For the latest version see <ahref="https://matplotlib.org/stable/api/backend_managers_api.html">https://matplotlib.org/stable/api/backend_managers_api.html</a></div>
<emclass="property">class </em><codeclass="descclassname">matplotlib.backend_managers.</code><codeclass="descname">ToolManager</code><spanclass="sig-paren">(</span><em>figure=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager" title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Attributes:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><aclass="reference internal" href="#matplotlib.backend_managers.ToolManager.figure" title="matplotlib.backend_managers.ToolManager.figure"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">figure</span></code></a><spanclass="classifier"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Figure</span></code></span></dt><dd><p>Figure that holds the canvas.</p>
</dd>
<dt><strong>keypresslock</strong><spanclass="classifier"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">widgets.LockDraw</span></code></span></dt><dd><p><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LockDraw</span></code> object to know if the <aclass="reference internal" href="#matplotlib.backend_managers.ToolManager.canvas" title="matplotlib.backend_managers.ToolManager.canvas"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">canvas</span></code></a> key_press_event is locked</p>
</dd>
<dt><strong>messagelock</strong><spanclass="classifier"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">widgets.LockDraw</span></code></span></dt><dd><p><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LockDraw</span></code> object to know if the message is available to write</p>
<emclass="property">property </em><codeclass="descname">active_toggle</code><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.active_toggle" title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>name</strong><spanclass="classifier">str</span></dt><dd><p>Name of the tool, treated as the ID, has to be unique.</p>
</dd>
<dt><strong>tool</strong><spanclass="classifier">class_like, i.e. str or type</span></dt><dd><p>Reference to find the class of the Tool to added.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<divclass="admonition seealso">
<pclass="first admonition-title">See also</p>
<dlclass="last docutils">
<dt><aclass="reference internal" href="backend_tools_api.html#matplotlib.backend_tools.ToolBase" title="matplotlib.backend_tools.ToolBase"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.backend_tools.ToolBase</span></code></a></dt><dd>The base class for tools.</dd>
</dl>
</div>
<pclass="rubric">Notes</p>
<p>args and kwargs get passed directly to the tools constructor.</p>
<emclass="property">property </em><codeclass="descname">canvas</code><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.canvas" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">figure</code><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.figure" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_tool</code><spanclass="sig-paren">(</span><em>self</em>, <em>name</em>, <em>warn=True</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager.get_tool"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.get_tool" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the tool object, also accepts the actual tool for convenience.</p>
<codeclass="descname">get_tool_keymap</code><spanclass="sig-paren">(</span><em>self</em>, <em>name</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager.get_tool_keymap"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.get_tool_keymap" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the keymap associated with the specified tool.</p>
<codeclass="descname">message_event</code><spanclass="sig-paren">(</span><em>self</em>, <em>message</em>, <em>sender=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager.message_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.message_event" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">remove_tool</code><spanclass="sig-paren">(</span><em>self</em>, <em>name</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager.remove_tool"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.remove_tool" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_figure</code><spanclass="sig-paren">(</span><em>self</em>, <em>figure</em>, <em>update_tools=True</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager.set_figure"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.set_figure" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">toolmanager_connect</code><spanclass="sig-paren">(</span><em>self</em>, <em>s</em>, <em>func</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager.toolmanager_connect"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.toolmanager_connect" title="Permalink to this definition">¶</a></dt>
<dd><p>Connect event with string <em>s</em> to <em>func</em>.</p>
<codeclass="descname">toolmanager_disconnect</code><spanclass="sig-paren">(</span><em>self</em>, <em>cid</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager.toolmanager_disconnect"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.toolmanager_disconnect" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">tools</code><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.tools" title="Permalink to this definition">¶</a></dt>
<dd><p>A dict mapping tool name -> controlled tool.</p>
<codeclass="descname">update_keymap</code><spanclass="sig-paren">(</span><em>self</em>, <em>name</em>, <em>*keys</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_managers.html#ToolManager.update_keymap"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_managers.ToolManager.update_keymap" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the keymap to associate with the specified tool.</p>