Python Tutorials · Python Matplotlib

Matplotlib Get Started

Learn all about Matplotlib Get Started in this comprehensive tutorial.

5 min read intermediate
  • If you have Python and PIP already installed on a system, then installation of Matplotlib is very easy.
  • Once Matplotlib is installed, import it in your applications by adding the import module statement:
  • The version string is stored under __version__ attribute.

Installation of Matplotlib

If you have Python and PIP already installed on a system, then installation of Matplotlib is very easy.

Install it using this command:

python

If this command fails, then use a python distribution that already has Matplotlib installed,  like Anaconda, Spyder etc.

Import Matplotlib

Once Matplotlib is installed, import it in your applications by adding the import module statement:

python

Now Matplotlib is imported and ready to use:

Checking Matplotlib Version

The version string is stored under __version__ attribute.

python
Note: Note: two underscore characters are used in __version__.

Module quiz

2 questions
1

Which of the following is true about Matplotlib Get Started?

2

What is the most common pitfall when working with Matplotlib Get Started?

Answer all questions to submit.