The Wayback Machine - https://web.archive.org/web/20240629005639/https://www.geeksforgeeks.org/install-matplotlib-python/
Open In App

How to Install Matplotlib on python?

Last Updated : 27 Dec, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. In this article, we will look into the various process of installing Matplotlib on Windows.

Install Matplotlib on Windows

For Conda Users

If you want the installation to be done through conda, you can use the below command:

conda install matplotlib

Type y for yes when prompted.

You will get a similar message once the installation is complete

installing Matplotlib using conda

Make sure you follow the best practices for installation using conda as:

  • Use an environment for installation rather than in the base environment using the below command:
conda create -n my-env
conda activate my-env

Note: If your preferred method of installation is conda-forge, use the below command:

conda config --env --add channels conda-forge

For PIP Users using pip install matplotlib

pip install matplotlib command can be used to install it. Users who prefer to use pip can use the below command to install Matplotlib:

pip install matplotlib

You will get a similar message once the installation is complete:

installing Matplotlib using PIP

Verifying Matplotlib Installation

To verify if Matplotlib has been successfully installed in your system using pip install matplotlib run the below code in a Python IDE of your choice:

Python3




import matplotlib
matplotlib.__version__


If successfully installed you will get the following output.

Verifying Matplotlib installation


Previous Article
Next Article

Similar Reads

How to Install Matplotlib on Linux?
Matplotlib is a low-level library of Python which is used for data visualization. It is easy to use and emulates MATLAB like graphs and visualization. This library is built on the top of NumPy arrays and consist of several plots like line chart, bar chart, histogram, etc. It provides a lot of flexibility but at the cost of writing more code. Enviro
2 min read
How to Install Matplotlib on MacOS?
In this article, we will learn how to install Matplotlib in Python on MacOS. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Installation:Method 1: Using pip to install Matplotlib Package Follow the below steps to install the Matplotlib package on macOS using pip: Step 1: Install the la
2 min read
How to Install Matplotlib on Anaconda?
Involvement in any Charts and Graphs is a bit common while you are working on concepts like Data Analysis, Machine Learning, etc in Python. Luckily, Python has the Anaconda Prompt Distribution that can be used to add multiple libraries with ease. One such important library is popularly known as the Matplotlib Python Library. In this article, we wil
3 min read
Matplotlib.colors.rgb_to_hsv() in Python
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. matplotlib.colors.rgb_to_hsv() The matplotlib.colors.rgb_to_hsv() function belongs to the matplotlib.colors module. The matplotlib.colors.
2 min read
Violinplot in Python using axes class of Matplotlib
Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. #Sample Code # Implementation of matplotlib functi
2 min read
Matplotlib.pyplot.broken_barh() in Python
Matplotlib is one of the most popular Python packages used for data visualization. It is a cross-platform library for making 2D plots from data in arrays. Pyplot is a collection of command style functions that make matplotlib work like MATLAB. matplotlib.pyplot.broken_barh() The function broken_barh() is used to Plot a horizontal sequence of rectan
2 min read
Matplotlib.ticker.MultipleLocator Class in Python
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. matplotlib.ticker.MultipleLocator The matplotlib.ticker.MultipleLocator class is used for setting a tick for every integer multiple of a b
1 min read
Matplotlib.axes.Axes.contourf() in Python
Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. matplotlib.axes.Axes.contourf() Function The Axes.
2 min read
Matplotlib.axes.Axes.fill() in Python
Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. matplotlib.axes.Axes.fill() Function The Axes.fill
2 min read
matplotlib.axes.Axes.fill_betweenx() in Python
Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. matplotlib.axes.Axes.fill_betweenx() Function The
3 min read