Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Why Use Matplotlib? | Matplotlib Introduction
Ultimate Visualization with Python

Why Use Matplotlib?Why Use Matplotlib?

First of all, what is Matplotlib?

Matplotlib is one of the most used libraries in Python used for data visualization. Despite being comprehensive by allowing the creation of all kinds of static, animated, and interactive visualizations, it is actually quite easy to use. On top of that, matplotlib is open source, which is indeed great.

We believe that starting learning visualization in Python with matplotlib is the best option, since most of the other visualization libraries in Python are built on top of it.

Before diving into matplotlib let's have a look at an example of the plot created with its help:

Matplotlib plot example

Looks pretty neat, doesn't it? What if I tell you that this plot can be created with just a few lines of code?  Moreover, we can even go as far as making it interactive. That's the power of matplotlib

Now without further ado let's go to our first task in this course. The majority of matplotlib utilities are located within the pyplot submodule, hence we will use it further in the course.

Task

There are two possible ways to import it, the first one is more common, while the second one  is more appropriate according to PEP.

Your task is the following:

  1. Import the pyplot submodule from the matplotlib library with the plt alias without using the from keyword.
  2. Import the pyplot submodule from the matplotlib library with the plt alias using the from keyword.

Once you've completed this task, click the button below the code to check your solution.

Everything was clear?

Section 1. Chapter 2
toggle bottom row
course content

Course Content

Ultimate Visualization with Python

Why Use Matplotlib?Why Use Matplotlib?

First of all, what is Matplotlib?

Matplotlib is one of the most used libraries in Python used for data visualization. Despite being comprehensive by allowing the creation of all kinds of static, animated, and interactive visualizations, it is actually quite easy to use. On top of that, matplotlib is open source, which is indeed great.

We believe that starting learning visualization in Python with matplotlib is the best option, since most of the other visualization libraries in Python are built on top of it.

Before diving into matplotlib let's have a look at an example of the plot created with its help:

Matplotlib plot example

Looks pretty neat, doesn't it? What if I tell you that this plot can be created with just a few lines of code?  Moreover, we can even go as far as making it interactive. That's the power of matplotlib

Now without further ado let's go to our first task in this course. The majority of matplotlib utilities are located within the pyplot submodule, hence we will use it further in the course.

Task

There are two possible ways to import it, the first one is more common, while the second one  is more appropriate according to PEP.

Your task is the following:

  1. Import the pyplot submodule from the matplotlib library with the plt alias without using the from keyword.
  2. Import the pyplot submodule from the matplotlib library with the plt alias using the from keyword.

Once you've completed this task, click the button below the code to check your solution.

Everything was clear?

Section 1. Chapter 2
toggle bottom row
some-alt