matplotlib.pyplot.get_current_fig_manager()函数
Matplotlib是Python中的一个库,它是NumPy库的数值-数学扩展。Pyplot是一个基于状态的Matplotlib模块接口,该模块提供了一个类似matlab的接口。Pyplot中可以使用的绘图有直线图、轮廓图、直方图、散点图、三维图等。
matplotlib.pyplot.get_current_fig_manager()方法
matplotlib库pyplot模块中的get_current_fig_manager()方法用于获取当前图形的图形管理器。
语法:matplotlib.pyplot.get_current_fig_manager ()
参数:此方法不接受任何参数。
返回:此方法返回当前图形的图形管理器。
下面的例子演示了matplotlib.pyplot.get_current_fig_manager()函数在matplotlib.pyplot中的作用:
示例1
输出:
get_current_fig_manager()返回值:
<matplotlib.backends._backend_tk.FigureManagerTk object at 0x07BE6470>
示例2
输出:
get_current_fig_manager()返回值:
<matplotlib.backends._backend_tk.FigureManagerTk object at 0x08725490>