How to Install Matplotlib on Windows?
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.
The only thing that you need for installing Numpy on Windows are:
Installing 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
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:
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:
Verifying Matplotlib Installation:
To verify if Matplotlib has been successfully installed in your system run the below code in a python IDE of your choice:
If successfully installed you will get the following output.