Matplotlib.pyplot as plt

There are several Python libraries used for creating visualization plots, each with its own strengths and unique features.

Matplotlib and seaborn are a popular Python library used for creating static, interactive, and animated visualizations. They are widely used for plotting graphs, charts, and other visual representations of data.

Useful concepts in Matplotlib..For detailed examples and explanations, please refer to the link)

  • Importing matplotlib.pyplot as plt
  • %matplotlib inline (using this we dont need to type plt.show())
  • scatter plot - plt.scatter()
  • plot - plt.plot()
  • subplots - plt.subplot()
  • bar plots - plt.bar()
  • histograms - plt.hist()
  • box plot - plt.boxplot()
  • pie chart - plt.pie()
Titles and saving image done using..
plt.xlabel('x axis title')
plt.ylavel('y axis title')
plt.savefig(test.png)
Previous Post Next Post