We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07d30a6 commit 11cc44fCopy full SHA for 11cc44f
1 file changed
examples/user_interfaces/multifigure.py
@@ -3,20 +3,21 @@
3
matplotlib.use('GTK3AGG')
4
# matplotlib.rcParams['backend.multifigure'] = False
5
matplotlib.rcParams['toolbar'] = 'toolmanager'
6
-from matplotlib.backend_tools import ToolBase
+from matplotlib.backend_tools import ToolToggleBase
7
8
9
from matplotlib.figure import Figure
10
from matplotlib.backend_managers import FigureManager
11
12
13
-class t1(ToolBase):
+class t1(ToolToggleBase):
14
+ radio_group = 'multifigure'
15
description = "change canvas"
16
def __init__(self, *args, **kwargs):
17
self.mfigure = kwargs.pop('figure')
- ToolBase.__init__(self, *args, **kwargs)
18
+ ToolToggleBase.__init__(self, *args, **kwargs)
19
- def trigger(self, *args, **kwargs):
20
+ def enable(self, *args, **kwargs):
21
self.toolmanager.manager.figure = self.mfigure
22
23
0 commit comments