我想知道 matplotlib 在哪里以及如何存储有关绘图、标题、标签和...的信息
在一些python库中,你创建一个类的实例,然后修改属性或调用方法以获得你想要的结果。但例如在 matplotlib
plt.plot(x, y)
plt.title('matplotlib')
plt.show()
plot 和 title 是两个独立的函数,show 函数如何访问这两个函数的返回值,这里涉及到什么样的数据结构?
我想知道 matplotlib 在哪里以及如何存储有关绘图、标题、标签和...的信息
在一些python库中,你创建一个类的实例,然后修改属性或调用方法以获得你想要的结果。但例如在 matplotlib
plt.plot(x, y)
plt.title('matplotlib')
plt.show()
plot 和 title 是两个独立的函数,show 函数如何访问这两个函数的返回值,这里涉及到什么样的数据结构?
According to the Matplotlib documentation:
In matplotlib.pyplot various states are preserved across function calls, so that it keeps track of things like the current figure and plotting area, and the plotting functions are directed to the current axes (please note that "axes" here and in most places in the documentation refers to the axes part of a figure and not the strict mathematical term for more than one axis).