Matplotlib.pyplot.subplot_tool() in Python (original) (raw)
Last Updated : 11 Apr, 2020
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
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:
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:
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:
Similar Reads
- Matplotlib.pyplot.subplot2grid() in python Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. Matplotlib.pyplot.subplot2grid() The Matplotlib.pyplot.subplot2grid() function give addi 3 min read
- Matplotlib.pyplot.triplot() in python 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. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read
- Matplotlib.pyplot.subplots_adjust() in Python 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. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read
- Matplotlib.pyplot.subplot() function in Python Prerequisites: matplotlib subplot() function adds subplot to a current figure at the specified grid position. Â It is similar to the subplots() function however unlike subplots() it adds one subplot at a time. So to create multiple plots you will need several lines of code with the subplot() function 2 min read
- Matplotlib.pyplot.show() in Python 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 - # sample code import matplotlib.pyplot as plt plt.plot([1, 2, 3, 4], [16, 4, 1, 8]) plt.sho 2 min read
- Matplotlib.pyplot.sci() in Python 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. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read
- Matplotlib.pyplot.sca() in Python 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. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 1 min read
- Matplotlib.pyplot.semilogx() in Python Data Visualization Is an important part of analyzing the data as plotting graphs helps in providing better insight and understanding of the problem. Matplotlib.pyplot is one of the most commonly used libraries to do the same. It helps in creating attractive data and is super easy to use. Matplotlib. 8 min read
- Matplotlib.pyplot.xlim() in Python 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. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read
- Matplotlib.pyplot.ylim() in Python 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. matplotlib.pyplot.ylim() Function The ylim() function in pyplot module of matplotlib library is used to g 2 min read