Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 261b9c5 commit 3e078bcCopy full SHA for 3e078bc
lib/matplotlib/figure.py
@@ -1444,12 +1444,10 @@ def gca(self, **kwargs):
1444
"axes, or if no axes exist, create new axes with default "
1445
"keyword arguments. To create a new axes with non-default "
1446
"arguments, use plt.axes() or plt.subplot().")
1447
- cax = self._axstack()
1448
- if cax is None:
1449
- # no axes found, so create one which spans the figure
+ if self._axstack.empty():
1450
return self.add_subplot(1, 1, 1, **kwargs)
1451
else:
1452
- return cax
+ return self._axstack()
1453
1454
def _gci(self):
1455
# Helper for `~matplotlib.pyplot.gci`. Do not use elsewhere.
0 commit comments