matplotlib.pyplot.gca

2022-09-03 22:23:30 浏览数 (1)

matplotlib.pyplot.gca(**kwargs)[source]

Get the current Axes instance on the current figure matching the given keyword args, or create one.

See also

matplotlib.figure.Figure.gca

The figure's gca method.

Examples

To get the current polar axes on the current figure:

代码语言:javascript复制
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.

0 人点赞