Matplotlib Getting Started

The Matplotlib is being presented here to help you maximize your learning potential.


What is it?

Matplotlib is a low-level graph plotting library in Python that serves as a visualization tool – It was introduced in 2002 by John Hunter.

Data visualization is made easy with Matplotlib, a library built on NumPy arrays and intended for use with the broader SciPy framework – We can freely use it since it’s open source.

We can visualise enormous amounts of data in easily digestible visuals because visualization allows us visual access to them.

Several plot types are available in Matplotlib, including lines, bars, scatters, histograms, and more.

For platform compatibility, It is mainly written in Python, but there are a few segments written in C, Objective-C, and Javascript.

Install Matplotlib

Python and PIP must already be installed on a system for Matplotlib installation to take place.

PyPI offers wheel packages for macOS, Windows and Linux. You can install it using pip:


pip install matplotlibAlternatively, use a Python distribution that already has Matplotlib installed, such as Anaconda, Spyder, etc. The Conda package There are two ways to access Matplotlib via Anaconda.conda install matplotlib

You can also reach out to the community channel at conda-forge.

conda install -c conda-forge matplotlib

Managing Linux packages

Matplotlib can be installed via your package manager if you’re using the Python version provided with your Linux distribution, for instance:

For Red Hat and Centos:

sudo yum install python3-matplotlib

For Debian and Ubuntu:

sudo apt-get install python3-matplotlib

For Fedora:

sudo dnf install python3-matplotlib


Import Matplotlib

Matplotlib can be imported by adding the import module statement to your applications once it has been installed:

import matplotlib

Matplotlib has now been imported and is ready to be used:

Check Version

Version strings are stored in __version__ attributes.



import matplotlib print(matplotlib.__version__)

Please note that there are two underscore characters in the version attribute.


The following command can be used if you need to remove Matplotlib from your Python for whatever reason:

pip uninstall matplotlib
Type “y” and press Enter to remove the package:


We value your feedback.

Subscribe To Our Newsletter
Enter your email to receive a weekly round-up of our best posts. Learn more!

Leave a Reply

Your email address will not be published. Required fields are marked *