Private helper for `add_axes` and `add_subplot`.
(self, ax, key)
| 777 | return self._add_axes_internal(ax, key) |
| 778 | |
| 779 | def _add_axes_internal(self, ax, key): |
| 780 | """Private helper for `add_axes` and `add_subplot`.""" |
| 781 | self._axstack.add(ax) |
| 782 | if ax not in self._localaxes: |
| 783 | self._localaxes.append(ax) |
| 784 | self.sca(ax) |
| 785 | ax._remove_method = self.delaxes |
| 786 | # this is to support plt.subplot's re-selection logic |
| 787 | ax._projection_init = key |
| 788 | self.stale = True |
| 789 | ax.stale_callback = _stale_figure_callback |
| 790 | return ax |
| 791 | |
| 792 | def subplots(self, nrows=1, ncols=1, *, sharex=False, sharey=False, |
| 793 | squeeze=True, width_ratios=None, height_ratios=None, |
no test coverage detected