📜  Python中的 Matplotlib.pyplot.subplot_tool()

📅  最后修改于: 2022-05-13 01:54:50.470000             🧑  作者: Mango

Python中的 Matplotlib.pyplot.subplot_tool()

Matplotlib是Python中的一个库,它是 NumPy 库的数值数学扩展。 PyplotMatplotlib模块的基于状态的接口,它提供了一个类似 MATLAB 的接口。

示例代码

# sample code
import matplotlib.pyplot as plt 
    
plt.plot([1, 2, 3, 4], [16, 4, 1, 8]) 
plt.show() 

输出:

matplotlib.pyplot.subplot_tool()函数

matplotlib 库的 pyplot 模块中的subplot_tool()函数用于启动图形的子图工具窗口。

下面的示例说明了 matplotlib.pyplot 中的 matplotlib.pyplot.subplot_tool()函数:

示例 #1:

matplotlib.pyplot.subplot_tool(targetfig=None)

输出:

示例 #2:

# Implementation of matplotlib function
import matplotlib.pyplot as plt
import numpy as np
  
fig, axs = plt.subplots()
  
axs.plot(np.random.random((10, 10)))
  
plt.subplot_tool()
  
fig.suptitle('matplotlib.pyplot.subplot_tool() Example')
plt.show()

输出: