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

Method add_figure

lib/matplotlib/backend_tools.py:472–482  ·  view source on GitHub ↗

Add the current figure to the stack of views and positions.

(self, figure)

Source from the content-addressed store, hash-verified

470 super().__init__(*args, **kwargs)
471
472 def add_figure(self, figure):
473 """Add the current figure to the stack of views and positions."""
474
475 if figure not in self.views:
476 self.views[figure] = cbook._Stack()
477 self.positions[figure] = cbook._Stack()
478 self.home_views[figure] = WeakKeyDictionary()
479 # Define Home
480 self.push_current(figure)
481 # Make sure we add a home view for new Axes as they're added
482 figure.add_axobserver(lambda fig: self.update_home_views(fig))
483
484 def clear(self, figure):
485 """Reset the Axes stack."""

Callers

nothing calls this directly

Calls 3

push_currentMethod · 0.95
update_home_viewsMethod · 0.95
add_axobserverMethod · 0.80

Tested by

no test coverage detected