Learn Python – How to install matplotlib in Python- Basic and advance

A matplotlib is an open-source Python library which used to plot the graphs. It is in the beginning conceived by the John D. Hunter in 2002. The model was released in 2003, and the modern day model is released 3.1.1 on 1 July 2019.

It represents the statistics through the graphical form. The graphical structure can be a Scatter Plot, Bar Graph, Histogram, Area Plot, Pie Plot, etc. The matplotlib library is commonly used to facts visualization. Data visualization lets in us to make a tremendous decision for organization.

Let’s see the installation of the matplotlib.

Installing the matplotlib

Before working with the matplotlib library, we want to deploy it in out Python environment. Let’s see the following approach of installing matplotlib library.

Using Anaconda distribution of Python

The Anaconda distribution is an easiest way to installation matplotlib library because matplotlib is pre-installed in it. So we don’t need to further installation.

Go to its official site and click the download button.

Select the download the version according to your Python interpreter configuration.

Installing Matplotlib using the Matplotlib

We can also install the matplotlib using the conda prompt. Open the conda prompt and type the following command.

conda install matplotlib    

Using pip command

The pip can also use to deploy the matplotlib library. Open the command prompt, type the following command.

pip install matplotlib    

Confirm the Installation

To affirm that matplotlib is mounted true or not, type the following command consists of calling .__version __ in the terminal.

import matplotlib    

Now, we are ready to work with the matplotlib.