![]() |
VOOZH | about |
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, etc.
The clf() function in pyplot module of matplotlib library is used to clear the current figure.
Syntax:
matplotlib.pyplot.clf()
Below examples illustrate the matplotlib.pyplot.clf() function in matplotlib.pyplot:
Example 1:
Output:
Example 2: