SATAN 先生的博客而且类 matplotlib.figure.Figure 中的 gca(...) 函数确实有这么两行代码: # no axes found, so create one which spans the figure return self.add_subplot(1, 1, 1, **kwargs) 发现当前 Figure 没有 AxesSubplot...
MqtGhj的博客# turn the top spine and the right spine off for spine in plt.gca().spines.keys(): if spine == "top" or spine == "right": plt.gca().spines[spine].set_color("none") # turn bottom tick for x-axis on plt...