Member-only story

Matplotlib Tutorial: How to Get Started With Matplotlib

Jesse L
3 min readOct 8, 2021

--

Hi everyone, welcome back. Matplotlib is a library for the Python programming language and is commonly used for data science and data visualization purposes. Matplotlib can be thought of a library that provides graph plotting functions that gives us visualization support. Let’s go over how you can get started with Matplotlib.

Installation

In order to work with Matplotlib, we will need to have Python and PIP installed onto our machines. Python can be downloaded and installed here and PIP can be downloaded and installed here. Once we have both Python and PIP installed, we can then install Matplotlib through the command line. Open up a command prompt or terminal and enter:

pip install matplotlib

Alternatively, Matplotlib can be downloaded and used through a Python distribution such as Anaconda or Spyder.

Importing

Now we want to import Matplotlib into our project to use. We can do this the same way we handle other imports by adding this line to our Python file:

import matplotlib

We can also import individual modules of Matplotlib into our project, for instance if we only want to import the Pyplot module, we can do so by adding this line to our file:

--

--

Jesse L
Jesse L

Written by Jesse L

Hi, I'm a passionate technology enthusiast and lifelong learner. Beyond my technical pursuits, I'm also passionate about sharing my enthusiasm with others.

No responses yet