Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4edd23

Browse files
committed
rename tools to default_tools to avoid confusion
1 parent 1b83628 commit e4edd23

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

lib/matplotlib/backend_tools.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -926,31 +926,31 @@ def _mouse_move(self, event):
926926
self.navigation.canvas.draw_idle()
927927

928928

929-
tools = {'home': ToolHome, 'back': ToolBack, 'forward': ToolForward,
930-
'zoom': ToolZoom, 'pan': ToolPan,
931-
'subplots': 'ToolConfigureSubplots',
932-
'save': 'ToolSaveFigure',
933-
'grid': ToolGrid,
934-
'fullscreen': ToolFullScreen,
935-
'quit': ToolQuit,
936-
'allnav': ToolEnableAllNavigation,
937-
'nav': ToolEnableNavigation,
938-
'xscale': ToolXScale,
939-
'yscale': ToolYScale,
940-
'position': ToolCursorPosition,
941-
_views_positions: ToolViewsPositions,
942-
'cursor': 'ToolSetCursor',
943-
'rubberband': 'ToolRubberband'}
929+
default_tools = {'home': ToolHome, 'back': ToolBack, 'forward': ToolForward,
930+
'zoom': ToolZoom, 'pan': ToolPan,
931+
'subplots': 'ToolConfigureSubplots',
932+
'save': 'ToolSaveFigure',
933+
'grid': ToolGrid,
934+
'fullscreen': ToolFullScreen,
935+
'quit': ToolQuit,
936+
'allnav': ToolEnableAllNavigation,
937+
'nav': ToolEnableNavigation,
938+
'xscale': ToolXScale,
939+
'yscale': ToolYScale,
940+
'position': ToolCursorPosition,
941+
_views_positions: ToolViewsPositions,
942+
'cursor': 'ToolSetCursor',
943+
'rubberband': 'ToolRubberband'}
944944
"""Default tools"""
945945

946-
toolbar_tools = [['navigation', ['home', 'back', 'forward']],
947-
['zoompan', ['zoom', 'pan']],
948-
['layout', ['subplots']],
949-
['io', ['save']]]
946+
default_toolbar_tools = [['navigation', ['home', 'back', 'forward']],
947+
['zoompan', ['zoom', 'pan']],
948+
['layout', ['subplots']],
949+
['io', ['save']]]
950950
"""Default tools in the toolbar"""
951951

952952

953-
def add_tools_2_navigation(navigation, tools=tools):
953+
def add_tools_2_navigation(navigation, tools=default_tools):
954954
"""
955955
Add multiple tools to `Navigation`
956956
@@ -965,7 +965,7 @@ def add_tools_2_navigation(navigation, tools=tools):
965965
navigation.add_tool(name, tool)
966966

967967

968-
def add_tools_2_container(container, tools=toolbar_tools):
968+
def add_tools_2_container(container, tools=default_toolbar_tools):
969969
"""
970970
Add multiple tools to the container.
971971

0 commit comments

Comments
 (0)