 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to install matplotlib in Python?
Matplotlib is a Python library that helps to plot graphs. It is used in data visualization and graphical plotting.
To use matplotlib, we need to install it.
Step 1 ? Make sure Python and pip is preinstalled on your system
Type the following commands in the command prompt to check is python and pip is installed on your system.
To check Python
python --version
If python is successfully installed, the version of python installed on your system will be displayed.
To check pip
pip -V
The version of pip will be displayed, if it is successfully installed on your system.
Step 2 ? Install Matplotlib
Matplotlib can be installed using pip. The following command is run in the command prompt to install Matplotlib.
pip install matplotlib
This command will start downloading and installing packages related to the matplotlib library. Once done, the message of successful installation will be displayed.
Step 3 ? Check if it is installed successfully
To verify that matplotlib is successfully installed on your system, execute the following command in the command prompt. If matplotlib is successfully installed, the version of matplotlib installed will be displayed.
import matplotlib matplotlib.__version__
