Open In App

Matplotlib.pyplot.subplot_tool() in Python

Last Updated : 11 Apr, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. Sample Code Python3 1==
# sample code
import matplotlib.pyplot as plt 
  
plt.plot([1, 2, 3, 4], [16, 4, 1, 8]) 
plt.show() 
Output:

matplotlib.pyplot.subplot_tool() Function

The subplot_tool() function in pyplot module of matplotlib library is used to launch a subplot tool window for a figure.
Syntax:
matplotlib.pyplot.subplot_tool(targetfig=None)
Parameters: This method does not accept any parameter. Returns: This method does not return any value.
Below examples illustrate the matplotlib.pyplot.subplot_tool() function in matplotlib.pyplot: Example #1: Python3 1==
# 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()
Output: Example #2: Python3 1==
# Implementation of matplotlib function
import matplotlib.pyplot as plt
import numpy as np

fig, (axs, axs1) = plt.subplots(1, 2)

axs.pcolor(np.random.random((10, 10)))
axs1.imshow(np.random.random((10, 10)))

plt.subplot_tool()

fig.suptitle('matplotlib.pyplot.subplot_tool() Example')
plt.show()
Output:

Next Article
Article Tags :
Practice Tags :

Similar Reads