Update title and labels of plot - Python Mathplotlib Module. The following code shows how to update title and labels of line chart using pyplot of matplotlib module.
Import module:
import matplotlib.pyplot as plt
Create Data:
x = [10, 25, 30]
y = [30, 60, 40]
plt.plot(x, y)
plt.title("This is Plot Title")
plt.xlabel('Label for X-Axis')
plt.ylabel('Label of Y-Axis')
plt.show()
plt.plot(x, y)
plt.title("Welcome to the Ploting \n This is Another line")
plt.xlabel('Plot Number')
plt.ylabel('Important Var')
plt.show()