1.绘图库导入
import
import
2.创建一个图形实例
plt.figure(figsize=(15,5
figure说明:The Figure instance returned will also be passed to new_figure_manager in the backends, which allows to hook custom Figure classes into the pylab interface. Additional kwargs will be passed to the figure init function。
note:If you are creating many figures, make sure you explicitly call "close" on the figures you are not using, because this will enable pylab to properly clean up the memory.
注意:如果你创建了多个figure实例,必须确保你显式的调用“close”来释放你已经不再使用的figure实例。因为只有这样pylab才能正确的释放内存。
3.函数头:
defNoneNoneNoneNoneNoneTrueFalse
4.参数说明:
num :integer or string, optional, default: none
If not provided, a new figure will be created, and the figure number will be incremented. The figure objects holds this number in a number attribute. If num is provided, and a figur