Add the current figure to the stack of views and positions.
(self, figure)
| 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.""" |
nothing calls this directly
no test coverage detected