Have a question?
Message sent Close
3.8 out of 5
14 reviews on Udemy

Learning Path: Python:Data Visualization with Matplotlib 2.x

Perform data visualization and represent data in the right way with Matplotlib 2.x
Packt Publishing
107 students enrolled
English [Auto]
Use Matplotlib for data visualization with the Python programming language
Make use of various aspects of data visualization with Matplotlib
Work on transformation and back-ends, and change fonts and colors
Use Pandas and Jupyter to manipulate your tabular data
Master with the latest features in Matplotlib 2.x
Make clear and appealing figures for scientific publications
Extend the functionalities of Matplotlib with third-party packages, such as Basemap, GeoPandas, Mplot3d, Pandas, Scikit-learn, and Seaborn.
Design interactive plots using Jupyter Notebook

Are you looking forward to learn powerful data visualization techniques to make your data more presentable and informative? If yes, then this Learning Path is for you.

Packt’s Video Learning Paths are a series of individual video products put together in a logical and stepwise manner such that each video builds on the skills learned in the video before it.

Matplotlib is a multi-platform data visualization tool built upon the NumPy and SciPy frameworks. One of the most important features of Matplotlib is its ability to work well with many operating systems and graphics backends. Big data analytics are driving innovations in scientific research, digital marketing, policy-making, and much more. Matplotlib offers simple but powerful plotting interface, versatile plot types and robust customization. Matplotlib supports dozens of backends and output types, which means you can count on it to work regardless of which operating system you are using or which output format you wish.

The highlights of this Learning Path are: 

  • Construct different types of plot such as lines and scatters, bar plots, and histograms
  • Customize and represent data in 3D
  • Create data visualizations on 2D and 3D charts in the form of bar charts, bubble charts, heat maps, histograms, scatter plots, stacked area charts, swarm plots, and much more
  • Leverage the various aspects of data visualization and plots

In this Learning Path, you’ll hit the ground running and quickly learn how to make beautiful, illuminating figures with Matplotlib and a handful of other Python tools. You’ll understand data dimensionality and set up an environment by beginning with basic plots. You’ll enter into the exciting world of data visualization and plotting. You’ll work with line and scatter plots and construct bar plots and histograms. You’ll also explore images and contours in depth. Plot scaffolding is a very interesting topic wherein you’ll be taken through axes and figures to help you design excellent plots. You’ll learn how to control axes and ticks, and change fonts and colors. You’ll work on backend and transformations. You’ll then explore the most important companions for Matplotlib, Pandas and Jupyter, used widely for data manipulation, analysis, and visualization. You’ll acquire the basic knowledge on how to create and customize plots by Matplotlib.

Further, you’ll learn how to plot different types of economic data in the form of 2D and 3D graphs, which give insights from a deluge of data from public repositories, such as Quandl Finance. You’ll learn to visualize geographical data on maps and implement interactive charts. You’ll learn to create intuitive infographics.

You’ll explore 3D plotting, one of the best features when it comes to 3D data visualization, along with Jupyter Notebook, widgets, and creating movies for enhanced data representation. Geospatial plotting will be also be explored. Finally, you’ll learn how to create interactive plots with the help of Jupyter.

By the end of this Learning Path, you’ll be well versed with Matplotlib and construct advanced plots with additional customization techniques to perform advanced data visualization using the Matplotlib library.

Meet Your Experts:

We have combined the best works of the following esteemed authors to ensure that your learning journey is smooth:

  • Benjamin Keller is a postdoctoral researcher in the MUSTANG group at Universität Heidelberg’s Astronomisches Rechen-Institut. He obtained his PhD at McMaster University and got his BSc in Physics with a minor in Computer Science from the University of Calgary in 2011. His current research involves numerical modeling of the interstellar medium over cosmological timescales. As an undergraduate at the U of C, he worked with Dr. Jeroen Stil on stacking radio polarization to examine faint extragalactic sources. He also worked in the POSSUM Working Group 2 to determine the requirements for stacking applications for the Australian SKA Pathfinder (ASKAP) radio telescope. At McMaster, he worked with Dr. James Wadsley in the Physics & Astronomy department. His current research was focused around understanding how the energy released from supernovae explosions regulated the flow of gas through galaxies, and how that gas is converted into stars.
  • Aldrin Kay Yuen Yim is a PhD student in computational and system biology at Washington University School of Medicine. Before joining the university, his research primarily focused on big data analytics and bioinformatics, which led to multiple discoveries, including a novel major allergen class (designated as a Group 24th Major allergen by WHO/IUIS Allergen Nomenclature subcommittee) through a multi-omic approach analysis of dust mites (JACI 2015), as well as the identification of the salt-tolerance gene in soybeans through large-scale genomic analysis (Nat. Comm. 2014). He also loves to explore sci-fi ideas and put them into practice, such as the development of a DNA-based information storage system (iGEM 2010, Frontiers in Bioengineering and Biotechnology 2014). Aldrin’s current research interest focuses on neuro-development and diseases, such as exploring the heterogeneity of cell types within the nervous system, as well as gender dimorphism in brain cancers (JCI Insight 2017). Aldrin is also the founding CEO of Codex Genetics Limited, which is currently servicing two research hospitals and the cancer registry of Hong Kong.
  • Allen Chi Shing Yu, PhD, is a Chevening Scholar, 2017-18, and an MSc student in computer science at the University of Oxford. He holds a PhD degree in Biochemistry from the Chinese University of Hong Kong, and he has used Python and Matplotlib extensively during his 10 years’ experience in the field of bioinformatics and big data analysis. During his research career, Allen has published 12 international scientific research articles and presented at four international conferences, including on-stage presentations at the Congress On the Future of Engineering Software (COFES) 2011, USA, and Genome Informatics 2014, UK. Other research highlights include discovering the novel subtype of Spinocerebellar ataxia (SCA40), identifying the cause of pathogenesis for a family with Spastic paraparesis, leading the gold medalist team in 2011 International Genetically Engineered Machine (iGEM) competition, and co-developing a number of cancer genomics project. Apart from academic research, Allen is also the co-founder of Codex Genetics Limited, which aims to provide personalized medicine services in Asia through the use of the latest genomics technology. With financial and business support from the HKSAR Innovation and Technology Commission, Hong Kong Science Park, and the Chinese University of Hong Kong, Codex Genetics has curated and transformed recent advances in cancer and neuro-genomics research into clinically actionable insights.
  • Claire Yik Lok Chung is now a PhD student at the Chinese University of Hong Kong working on Bioinformatics, after receiving her BSc degree in Cell and Molecular Biology. With her passion for scientific research, she joined three labs during her college study, including the synthetic biology lab at the University of Edinburgh. Her current projects include soybean genomic analysis using optical mapping and the next-generation sequencing of data. Claire started programming 10 years ago, and uses Python and Matplotlib daily to tackle Bioinformatics problems and to bring convenience to life. Being interested in information technology in general, she leads the Campus Network Support Team in college and is constantly keeping up with the latest technological trends by participating in PyCon HK 2016. She is motivated to acquire new skills through self-learning and is keen to share her knowledge and experience. In addition to science, she has developed skills in multilingual translation and graphic design, and found these transferable skills useful at work.

Matplotlib for Python Developers

The Course Overview

This video gives an overview of entire course.

Understanding Data, Dimensionality, and Why We Plot

This video explains why do we need to plot data andwhat plots are appropriate for what kind of data.

Setting Up Your Environment

This video explains how to get your machine ready to develop plots using matplotlib.

Beginning with the Most Basic Plots

In this video, we will see how we can make some of the most common types of plots.

Differentiating Line and Scatter Plots

This video explains how the simplest kind of data is co relational and how x versus y. plot() and scatter() can be used to visualize this kind of data.

Constructing Bar Plots and Histograms

In this video, we will see how we can represent ordinal data, or the distribution of scalar datausing bar charts and histograms.

Exploring Images and Contours

In this video, we will see how we can represent 3D scalar fields (that is, data with x,y, and z components) with images and contours.

Working on Plots with Uncertainties

This video explains that not all numbers are created equal: some have uncertainties associated with them!

Looking at Other Useful Plot Types

This video explains what if a region or area is what we want to show and Also, what if a scatter plot is too dense.

Making Multiple Panel Plots

In this video, we will see how we can show multiple plots together.

Using Color Bars and Legends

In this video, we will see how we can annotate the colors or styles in our plots.

Working with the Components of a Matplotlib Plot

In this video, we will see what components are in a matplotlib plot and how do they work together.

Figure and Axes – How Do They Work?

In this video, we will learn which container objects are used for a plot,how can we construct and use them.

Working with Transformations

In this video, we will see which coordinate systems are used in a matplotlib plot and how does a data point get translated to a position in the plot image.

Controlling Axes and Ticks

In this video, we will see how matplotlib constructs the x and y axis andhow does it decide where the ticks go.

Ticker Formatting

In this video, we will learn how matplotlib formats the labels for the ticks on the x and y axis.

Working on Back Ends

In this video, we will see how matplotlib actually displays a plot on the screen or write to a file.

The Jupyter Notebook

In this video, we will see how we can use Jupyter and the notebook to present and work with matplotlib effectively.

Using Pandas to Manipulate Tabular Data

In this video, we will see how we can work with Pandas to make data manipulation easier.

Slicing and Dicing Pandas Data

In this video, we will see how we can use the rich features of Pandas Dataframes to select and manipulate data.

Pandas Built-in Plotting

In this video, we will see how we can use Pandas together with matplotlib to make plots efficiently.

Test Your Knowledge

Python Data Visualization with Matplotlib 2.x

The Course Overview

This video gives a glimpse of what this course offers you.

Getting Started with Matplotlib

Before you start working on any new platform, it is important to understand the essential concepts mentioned in it. This video is that first step to Matplotlib!

Setting Up the Plotting Environment

This video is your next essential step to explore Matplotlib, where you will learn to download, install and set up the environment on your machine. Let’s do it together right now!

Editing and Running Code

Now that we are all set with the environment set up, it’s time to get our hands dirty and begin writing some code.

Loading Data for Plotting

When you have to work with different types of data and dataset, you need to know the correct way to deal with them and load it for the processing purpose. This video will show you how to load data.

Plotting Our First Graph

It’s time to end our curiosity and jump right into plotting our first graph. Let’s have a look at some practical steps to plot a simple graph.

Basic Structure of a Matplotlib Figure

Before we go ahead in our journey of plotting figures, we need to understand the basic structure which will let us code well and get the right output.

Setting Colors in Matplotlib

Many elements in a Matplotlib figure can have their colors specified. There are several ways to do so. Let’s explore these methods.

Adjusting Text Formats

For an informative figure, we typically have a number of text elements, including the title,labels of axes and ticks, legend, and any additional annotations. This video will show you, how you can customize and adjust the text formats for these elements.

Customizing Lines and Markers

 Many times, we may want to customize the appearance of Lines and Marker to better distinguish datasets, or for better and more consistent styling. This video demonstrates the same in detail.

Customizing Grids and Ticks

Lines of grids, ticks, and axes help us to visually locate and measure data values. Their distribution and style determine whether they make good visual aids for the plot or clutter the figure. Let’s demonstrate the basic methods for these, in this video.

Customizing Axes

Now that you know how to customize Grids and Ticks, let’s go ahead to customize axes in our plots.

Using Style Sheets

We have learned to set the style details step by step so far. Let’s now move forward to use style sheets.

Title and Legend

How can you facilitate quick comprehension of data context. Title and legends is the answer to this. This video will teach you to work with these amazing elements.

Adjusting Layout

Figure layout, including the size and location of plots, directs the focus of readers. A figure with good layout facilitates data presentation in a logical flow. It is thus important to familiarize ourselves with layout settings when plotting. Let's see how to assign proper sizes, positions, and spacing to our plots.

Adding Subplots

There are frequent occasions when you would prefer to have different plots aligned in the same figure. How to go about it? This video, shows few important steps to do this.

Adjusting Margins

Let’s take a step further to adjust the subplot axes or the plot area to fit the inner layout by using several ways.

Drawing Inset Plots

While aligning relevant plots side by side, we also have the option to embed a smaller plot in the main figure to visualize data of a different scope. This video, will walk you through the steps to achieve this. 

Adding Text Annotations

Let us now learn to add text annotation to our figures by specifying the desired locations through some built-in functions in Matplotlib.

Adding Graphical Annotations

How can you increase the interest of the readers of your plots to stay focused when you have a lot of text already added for explanation? Image annotations are an answer to this. Let’s add image annotations to make our graph more attractive!

Typical API Data Formats

APIs are important because they are the medium of offering data in websites. It is important to know the data formats used in them. Here, we will look at the most important formats used.

Introducing Pandas

Beside NumPy and SciPy, pandas is one of the most common scientific computing libraries for Python. Hence, we will learn about them in this video.

Visualizing the Trend of Data

Once we have imported the two datasets, we can set out on a further visualization journey. Let’s visualize the data trend in this video.

Visualizing Univariate Distribution

Seaborn makes the task of visualizing the distribution of a dataset much easier. Let’s see how this works!

Visualizing a Bivariate Distribution

As a follow up to the previous video, we will now learn how to visualize two variations in one graph. This improves the visualization of the data.

Visualizing Categorical Data

In this video, we are going to implement a naive algorithm for classifying populations into one of the three categories. After that, we will explore different techniques of visualizing categorical data.

Controlling SeabornFigure Aesthetics

While we can use Matplotlib to customize the figure aesthetics, Seaborn comes with several handy functions to make customization easier. Let’s try that here.

More About Colors

Color is perhaps the most important aspect of figure style, and thus it deserves its own video 

Getting End-of-Day (EOD) Stock Data from Quandl

This video will show you some practical steps to work with the Quandl dataset and retrieve data for End-of-Day stock.

Two-Dimensional Faceted Plots

This video introduces three major ways to create faceted plots, which are seaborn.factorplot(), seaborn.FacetGrid(), and seaborn.pairplot().

Other Two-Dimensional Multivariate Plots

This section will walk you through the two special plot types that come in handy if you want the maximize space efficiency. Those are Heatmaps and Candlestick plots.

Three-Dimensional (3D) plots

This video will put more focus on 3D scatter plots and bar charts.

Scraping Information from Websites

 These data portals often provide Application Programming Interfaces for programmatic access to data. However, APIs are not available for some datasets; hence, we resort to good old web scraping techniques to extract information from websites.

Non-Interactive Backends

 Matplotlib backends differ much more than just in the support of graphical formats. Backends handle so many things behind the scenes! Let’s have a look at the Non-interactive backends first.

Interactive Backends

Through the use of interactive backends, plots in Matplotlib can be embedded in Graphical User Interface (GUI) applications

Creating Animated Plots

Matplotlib was not originally designed for creating animations, and there are GPU-accelerated Python animation packages that may be more suitable for such a task.

Effective Visualization – Planning Your Figure

This video gives you some essential and general rules while plotting your figure and to make it more effective and appealing

Effective Visualization – Crafting Your Figure

Now you should be clear about the purpose and overall plan for every plot to make. It is time to make it good. This video will teach you to adapt your figures to make them more digestible for the brain.

Visualizing Statistical Data More Intuitively

Let’s revisit more variants of bar charts–stacked bar chart and layered histograms, which are commonly used in scientific publications to summarize and describe data and make it more interesting.

Methods for Dimension Reduction

In the era of big data analysis, it is common to deal with datasets with a large number of features or dimensions. Visualization of data with high dimensionality is extremely challenging. This video will teach you 

Visualizing Population Health Information

Let’s take a step ahead to work with some real-world dataset which is really huge and visualize the statistics through plots.

Map-Based Visualization for Geographical Data

This video will demonstrate how you can incorporate a map-based visualization, which is powered by the GeoPandas library.

Combining Geographical and Population Health Data

This video will show you how you could combine both geographical and population health information of the US. Here we go! 

Survival Data Analysis on Cancer

Since we've spent a significant amount of time discussing death rate, let us conclude this section with one final analysis of two cancer datasets, in this video.

Test Your Knowledge

Developing Advanced Plots with Matplotlib

The Course Overview

This video provides an overview of the entire course.

Customizing Pylab in Style

In this video, we will see how we can customize the appearance of plots without manually tweaking each one.

Color Deep Dive

In this video, we will see how does matplotlib’s colormapsandcolor cycler works.

Working on Non-Trivial Layouts

In this video, we will see how we can layout subplots in a non-uniform grid.

The Matplotlib Configuration Files

In this video, we will see howmatplotlib configured.

Putting Lines in Place

In this video, we will see how we can add lines, grids, and boxes to annotate a plot.

Adding Text on Your Plots

Adding Text on Your Plots

Playing with Polygons and Shapes

In this video, we will see how we can add various shapes and polygons to our plots.

Versatile Annotating

In this video, we will see how we can annotate our plots with arrows and text together.

Non-Cartesian Plots

In this video, we will see how we can plot data on non-linear scales or non-Cartesian axes.

Plotting Vector Fields

In this video, we will show how we can plot 4D vector plotsand how can we show streamlines.

Statistics with Boxes and Violins

In this video, we will see how we can use box and violin plots to show statistical information.

Visualizing Ordinal and Tabular Data

In this video, we will show, how can we show small data sets with pie charts and tables.

Plotting with 3D Axes

In this video, we will see how can we generate and manipulate 3D axes.

Looking at Various 3D Plot Types

In this video, we will see what different kinds of 3D plots we can make with matplotlib.

The Basemap Methods

In this video, we will show how we can use basemap to generate plots on the earth’s surface.

Plotting on Map Projections

In this video, we will show how we can actually plot our data on a map projection.

Adding Geography

In this video, we will see how we can add features from real maps like topography, geography, and so on to a basemap plot.

Interactive Plots in the Jupyter Notebook

In this video, we will see how we can use the ipywidgets library to quickly and easily make interactive plots.

Event Handling with Plot Callbacks

In this video, we will see how can we add mouse and keyboard interactivity to our plots and their contents.

GUI Neutral Widgets

In this video, we will see how we can add buttons, sliders, and other widgets in to any interactive matplotlib backend.

Making Movies

In this video, we will see how can we make animated plots and movies, and save these plots as GIF and MP4 files.

Test Your Knowledge
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
3.8 out of 5
14 Ratings

Detailed Rating

Stars 5
Stars 4
Stars 3
Stars 2
Stars 1


10 hours on-demand video
Certificate of Completion


AulaGEO is a Ge-engineering specialized academy.

Social Network

Udemy Black Friday Sale! Top Courses From $9.99