matplotlib.figure.Figure.gca#

Figure.gca()[源]#

获取当前 Axes。

如果此 Figure 上当前没有 Axes,则会使用 Figure.add_subplot 创建一个新的 Axes。(要测试 Figure 上当前是否存在 Axes,请检查 figure.axes 是否为空。要测试 pyplot figure 堆栈上当前是否存在 Figure,请检查 pyplot.get_fignums() 是否为空。)