Matplotlib Mega-Tutorial - Data visualization in Python

preview_player
Показать описание


...

Matplotlib is the foundational data visualization library for Python. It's used by many data scientists (myself included), and several other popular data visualization libraries like seaborn are built on top of Matplotlib.

In this tutorial, I'll show you the basic parts of a Matplotlib graph (this can be surprisingly confusing), I'll give you an easy formula for plotting, we'll go through some basic graphs, and then we'll dive into more details by looking at commonly asked questions.

(We'll also start off with how to create your data science coding environment using a conda virtual environment to install all of the necessary packages. Or, you can use Google Colab for free without setting anything up on your computer.)

Specifically, here's what we'll cover:

- How to understand the different parts of a Matplotlib graph: the figure, the axes, the axis, etc.
- How to plot basic graphs in Matplotlib: line plots, bar graphs, scatterplots, histograms, etc.
- How to plot multiple graphs in the same chart (like a line plot and a bar graph together).
- How to plot using different colors for different data.
- How to add and alter text like titles and axis labels.
- How to use subplots to show different graphs on different axes.
- How to tweak and alter the graph in many of the commonly needed ways.

You learn best through doing—so grab your computer, and get ready to learn some data visualization in Matplotlib!

Happy learning!

---

00:00 Introduction
03:14 Create a project directory and download the data
07:50 Setup our Python environment using conda virtual environments (or Google Colab)
14:32 Launch Jupyter notebooks and setup our notebook
17:13 Parts of a Matplotlib figure
35:13 Basic graphs in Matplotlib
52:45 Plotting multiple graphs on the same axes
01:12:54 Adding and altering text
01:19:17 Using subplots in Matplotlib
01:30:15 Common question in Matplotlib
01:31:26 How do you change the figure size?
01:33:19 How do you save an image to a file?
01:35:48 How do you change the font size for titles, axis labels, and tick labels?
01:50:30 How do you change the tick frequency on the x-axis?
01:52:38 How do you set the y-axis limit?
01:53:56 How do you remove ticks and tick labels?
01:54:56 How do you turn off the axis?
01:56:10 How do you rotate axis tick label text?
01:57:31 How do you change scatterplot marker size?
02:01:14 How do you change the size and color of scatterplot points?
02:03:33 How do you plot using a logarithmic axis?
02:06:31 How do you plot two histograms on the same graph?
02:09:04 How do you plot horizontal and vertical lines?
02:11:45 How do you display an image in Matplotlib?
02:19:57 What colors can you use in Matplotlib?
02:22:52 Further learning, wrap-up and thank you!

---

Additional Project Data Science Resources:

---

Additional Resources:

Рекомендации по теме
Комментарии
Автор

one of the most underrated tutorial for matplotlib. Thank you for providing such a great tutorial

kartikA
Автор

You are an amazing teacher!! you explained everything clearly! It was one of the most useful tutorial i watched. Really thank you!! You are wonrerful!!

alainleclerc
Автор

Thank you so much, i'm learning data science and every body explain all this algorithms but no one explain the 3 basic modules used constantly throughout the algorithm : Numpy, Pandas and matplotlib

I'm lookinh through all of ur videos on the subject ! Thx !!!

hellothere
Автор

Thank you very much project Data Science. I really enjoyed and learned a lot from your PANDAS MEGA TUTORIAL and that pushed me to look for further stuff from you. I hope you make one on seaborn and also guide us on when to use seaborn and when to use matplotlib. I don't seem to grab the difference and their use cases.

reanalytics
Автор

Could you do another tutorial on Seaborn?

jasonyoung