WEBVTT

1
00:00:00.220 --> 00:00:02.230
<v Instructor>Hi guys, and welcome back.</v>

2
00:00:02.230 --> 00:00:04.390
In this section we're going to learn about

3
00:00:04.390 --> 00:00:07.880
creating graphs using MatPlotLib.

4
00:00:07.880 --> 00:00:09.550
I just want to give you a quick overview

5
00:00:09.550 --> 00:00:11.650
of the sort of things that we gonna be creating,

6
00:00:11.650 --> 00:00:14.250
so you get a taster of what we'll be learning.

7
00:00:14.250 --> 00:00:17.590
Do note though, that MatPlotLib is a little bit complicated,

8
00:00:17.590 --> 00:00:20.200
so we're going to be learning a lot of the fundamentals

9
00:00:20.200 --> 00:00:22.270
of MatPlotLib as we go through this section,

10
00:00:22.270 --> 00:00:24.790
as well as creating all of these charts.

11
00:00:24.790 --> 00:00:26.480
So we're gonna start with line charts.

12
00:00:26.480 --> 00:00:28.640
This looks pretty simple, we've got here

13
00:00:28.640 --> 00:00:31.610
a figure, a pair of axes, data points plotted,

14
00:00:31.610 --> 00:00:34.240
but this is actually four lines of code.

15
00:00:34.240 --> 00:00:37.360
So we're going to learn all about what those four lines do

16
00:00:37.360 --> 00:00:40.180
and how we can get these graphs up on the screen.

17
00:00:40.180 --> 00:00:42.880
We'll also learn how to produce multiple plots

18
00:00:42.880 --> 00:00:45.320
in one figure, so that we can export

19
00:00:45.320 --> 00:00:47.610
images that have multiple graphs in them,

20
00:00:47.610 --> 00:00:50.600
or that we can potentially have different types of graph

21
00:00:50.600 --> 00:00:52.150
in the same image.

22
00:00:52.150 --> 00:00:53.770
We'll also learn about pie charts

23
00:00:53.770 --> 00:00:57.530
and we'll create a set of pie charts for our polling data.

24
00:00:57.530 --> 00:00:59.980
Here you can see the Flask vs. Django poll

25
00:00:59.980 --> 00:01:01.810
that we created earlier on in the course,

26
00:01:01.810 --> 00:01:06.210
we're going to create a graph for the options in that poll.

27
00:01:06.210 --> 00:01:08.020
You can see that we've got labels in there,

28
00:01:08.020 --> 00:01:10.960
we've got the percentages for each segment of the pie chart,

29
00:01:10.960 --> 00:01:13.810
we're gonna learn how to separate different segments

30
00:01:13.810 --> 00:01:16.000
from the centre, this is called Explosion,

31
00:01:16.000 --> 00:01:17.660
as well as a bunch more stuff.

32
00:01:17.660 --> 00:01:19.210
We'll learn about bar charts as well,

33
00:01:19.210 --> 00:01:21.730
since they are one of the most popular types of chart.

34
00:01:21.730 --> 00:01:25.130
We'll learn how to create simple charts like this one here,

35
00:01:25.130 --> 00:01:28.210
where they have titles, labels in the axes,

36
00:01:28.210 --> 00:01:30.140
they've got rotated labels at the bottom

37
00:01:30.140 --> 00:01:32.220
so that they fit a bit more easily.

38
00:01:32.220 --> 00:01:35.580
And we'll also learn how to create stacked bar charts here,

39
00:01:35.580 --> 00:01:37.750
which may look similar, but there's a lot more

40
00:01:37.750 --> 00:01:39.250
going on behind the scenes.

41
00:01:39.250 --> 00:01:42.200
It's also got a legend at the top right corner,

42
00:01:42.200 --> 00:01:44.100
which can be pretty handy as well.

43
00:01:44.100 --> 00:01:46.140
This is by no means everything that we'll be learning

44
00:01:46.140 --> 00:01:47.510
in this section, though.

45
00:01:47.510 --> 00:01:49.580
We're going to learn how to configure charts,

46
00:01:49.580 --> 00:01:52.690
how to change colours, how to change settings, sizes,

47
00:01:52.690 --> 00:01:56.070
adjust how they fit within the window and much more.

48
00:01:56.070 --> 00:01:59.650
We'll learn how to export images, including PNG images

49
00:01:59.650 --> 00:02:02.630
that you can then put into websites or into PDFs.

50
00:02:02.630 --> 00:02:04.800
We'll learn how to create complex figures

51
00:02:04.800 --> 00:02:06.270
with multiple charts in them,

52
00:02:06.270 --> 00:02:08.670
how to plot multiple datasets into one chart

53
00:02:08.670 --> 00:02:09.950
if that's what you want to do.

54
00:02:09.950 --> 00:02:12.110
And overall and the most important thing,

55
00:02:12.110 --> 00:02:15.970
is we'll gain a fundamental understanding of MatPlotLib,

56
00:02:15.970 --> 00:02:19.250
which is not so easy to get, so learning more later on

57
00:02:19.250 --> 00:02:20.510
will be much easier.

58
00:02:20.510 --> 00:02:22.490
So thank you guys for joining me in this section,

59
00:02:22.490 --> 00:02:23.860
I hope that you will enjoy it.

60
00:02:23.860 --> 00:02:25.420
Let me know if you have any questions about it

61
00:02:25.420 --> 00:02:27.920
and I'll see you in the next video to get started.

