Matplotlib.pyplot.cla() in Python Last Updated : 19 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. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc. matplotlib.pyplot.cla() Function The cla() function in pyplot module of matplotlib library is used to clear the current axes. Syntax: matplotlib.pyplot.cla() Below examples illustrate the matplotlib.pyplot.cla() function in matplotlib.pyplot: Example 1: Python3 1== # Implementation of matplotlib function import matplotlib.pyplot as plt plt.plot([1, 2, 3, 4], [16, 4, 1, 8]) plt.cla() plt.title('matplotlib.pyplot.cla Example') plt.show() Output: Example 2: Python3 1== # Implementation of matplotlib function import numpy as np import matplotlib.pyplot as plt t = np.linspace(0.0, 2.0, 201) s = np.sin(2 * np.pi * t) fig, [ax, ax1] = plt.subplots(2, 1) ax.set_ylabel('y-axis') ax.plot(t, s) ax.grid(True) ax1.set_ylabel('y-axis') ax1.set_xlabel('x-axis') ax1.plot(t, s) ax1.grid(True) ax1.cla() fig.suptitle('matplotlib.pyplot.cla Example') plt.show() Output: Comment More infoAdvertise with us Next Article Matplotlib.pyplot.cla() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Practice Tags : python Similar Reads Matplotlib.pyplot.clf() 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.gca() in Python Matplotlib is a library in Python and it is a numerical - mathematical extension for the NumPy library. Pyplot is a state-based interface to a Matplotlib module that provides a MATLAB-like interface.  matplotlib.pyplot.gca() Function The gca() function in pyplot module of matplotlib library is used 2 min read Matplotlib.pyplot.clim() 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.clabel() in Python Contour plots or Level plots are a way to display a three-dimensional surface on a two-dimensional plane. It graphs as contours as one output variable z and two predictor variables x and y on the y-axis. Often such contours are also known as z-slices.The clabel() method in mathplotlib.pyplot is used 4 min read Matplotlib.pyplot.csd() in Python csd() method in Matplotlib is used to compute and plot the Cross Spectral Density (CSD) of two signals. It helps analyze the frequency domain relationship between two time series, revealing how the power of one signal is distributed relative to the other signal across frequencies. It's key features 4 min read Like