MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / add_tools_to_container

Function add_tools_to_container

lib/matplotlib/backend_tools.py:982–1001  ·  view source on GitHub ↗

Add multiple tools to the container. Parameters ---------- container : Container `.backend_bases.ToolContainerBase` object that will get the tools added. tools : list, optional List in the form ``[[group1, [tool1, tool2 ...]], [group2, [...]]]``

(container, tools=None)

Source from the content-addressed store, hash-verified

980
981
982def add_tools_to_container(container, tools=None):
983 """
984 Add multiple tools to the container.
985
986 Parameters
987 ----------
988 container : Container
989 `.backend_bases.ToolContainerBase` object that will get the tools
990 added.
991 tools : list, optional
992 List in the form ``[[group1, [tool1, tool2 ...]], [group2, [...]]]``
993 where the tools ``[tool1, tool2, ...]`` will display in group1.
994 See `.backend_bases.ToolContainerBase.add_tool` for details. If not specified,
995 then defaults to `.default_toolbar_tools`.
996 """
997 if tools is None:
998 tools = default_toolbar_tools
999 for group, grouptools in tools:
1000 for position, tool in enumerate(grouptools):
1001 container.add_tool(tool, group, position)

Callers

nothing calls this directly

Calls 1

add_toolMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…