Get the current Axes. If there is currently no Axes on this Figure, a new one is created using `.Figure.add_subplot`. (To test whether there is currently an Axes on a Figure, check whether ``figure.axes`` is empty. To test whether there is currently a Figu
(self)
| 1714 | return a |
| 1715 | |
| 1716 | def gca(self): |
| 1717 | """ |
| 1718 | Get the current Axes. |
| 1719 | |
| 1720 | If there is currently no Axes on this Figure, a new one is created |
| 1721 | using `.Figure.add_subplot`. (To test whether there is currently an |
| 1722 | Axes on a Figure, check whether ``figure.axes`` is empty. To test |
| 1723 | whether there is currently a Figure on the pyplot figure stack, check |
| 1724 | whether `.pyplot.get_fignums()` is empty.) |
| 1725 | """ |
| 1726 | ax = self._axstack.current() |
| 1727 | return ax if ax is not None else self.add_subplot() |
| 1728 | |
| 1729 | def _gci(self): |
| 1730 | # Helper for `~matplotlib.pyplot.gci`. Do not use elsewhere. |