参考 matplotlib.pyplot.gca - 云+社区 - 腾讯云
matplotlib.pyplot.
gca
(**kwargs)[source]
Get the current Axes instance on the current figure matching the given keyword args, or create one.
See also
The figure's gca method.
Examples
To get the current polar axes on the current figure:
plt.gca(projection='polar')
If the current axes doesn't exist, or isn't a polar one, the appropriate axes will be created and then returned.