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

Method set_figure

lib/matplotlib/backend_tools.py:230–246  ·  view source on GitHub ↗
(self, figure)

Source from the content-addressed store, hash-verified

228 return self._toggled
229
230 def set_figure(self, figure):
231 toggled = self.toggled
232 if toggled:
233 if self.figure:
234 self.trigger(self, None)
235 else:
236 # if no figure the internal state is not changed
237 # we change it here so next call to trigger will change it back
238 self._toggled = False
239 super().set_figure(figure)
240 if toggled:
241 if figure:
242 self.trigger(self, None)
243 else:
244 # if there is no figure, trigger won't change the internal
245 # state we change it back
246 self._toggled = True
247
248
249class ToolSetCursor(ToolBase):

Callers

nothing calls this directly

Calls 2

triggerMethod · 0.95
set_figureMethod · 0.45

Tested by

no test coverage detected