1 00:00:00,000 --> 00:00:03,720 All right, let's sum it up now. So we 2 00:00:03,720 --> 00:00:07,500 were able to generate graphs. And you 3 00:00:07,500 --> 00:00:11,880 saw that until now we generated, like single 4 00:00:11,880 --> 00:00:14,880 graphs. So for instance, here you will 5 00:00:14,880 --> 00:00:17,370 see a line graph. Now, if you want to 6 00:00:17,370 --> 00:00:20,790 combine multiple glyphs in one plot, 7 00:00:21,900 --> 00:00:25,380 that would be very simple. So let's say 8 00:00:25,380 --> 00:00:29,940 you've got two plots, you will add a 9 00:00:29,940 --> 00:00:31,860 scatterplot there. So you will need to 10 00:00:31,860 --> 00:00:35,490 add a circle glyph. So just below this 11 00:00:35,520 --> 00:00:37,320 line glyph or above that doesn't 12 00:00:37,320 --> 00:00:39,840 matter. So circles and with these 13 00:00:39,840 --> 00:00:42,840 coordinates, or we can change them. So 14 00:00:42,840 --> 00:00:46,698 let's say, let's double this x axis, 15 00:00:47,691 --> 00:00:50,415 i times 2 for i in 16 00:00:50,416 --> 00:00:52,706 [No audio] 17 00:00:52,708 --> 00:00:57,398 this list, which closes here, so and then this 18 00:00:57,399 --> 00:01:03,266 should be the size. Size let's say 8 and then olive. 19 00:01:03,274 --> 00:01:07,101 [No audio] 20 00:01:07,102 --> 00:01:09,358 So this is how you get multiple 21 00:01:09,360 --> 00:01:12,630 glyphs in one plot. That was very easy. 22 00:01:13,620 --> 00:01:15,090 And so I believe I give you a good 23 00:01:15,090 --> 00:01:17,280 introduction to the Bokeh library. 24 00:01:18,180 --> 00:01:20,370 And I believe you'll see its potential. 25 00:01:20,370 --> 00:01:22,770 So it's great to actually use Bokeh 26 00:01:22,770 --> 00:01:26,100 for generating visualizations. Now, if 27 00:01:26,100 --> 00:01:29,370 you want to go deeper into Bokeh, so 28 00:01:29,370 --> 00:01:31,230 you may want to have to plot different 29 00:01:31,230 --> 00:01:33,960 types of graphs, out point you refers to 30 00:01:33,960 --> 00:01:36,930 this resource. So this is documentation 31 00:01:36,930 --> 00:01:39,690 of the Bokeh documentation. And this is 32 00:01:39,690 --> 00:01:41,730 about plotting with glyphs. So what you 33 00:01:41,730 --> 00:01:44,370 have here is various examples that we 34 00:01:44,370 --> 00:01:47,760 use this one actually. And other ones 35 00:01:47,760 --> 00:01:51,570 as well lines, and you can also plot 36 00:01:51,600 --> 00:01:53,970 patches. So basically, you pass the 37 00:01:53,970 --> 00:01:56,550 coordinates of each of the points of the 38 00:01:56,550 --> 00:01:59,280 polygon here and Bokeh will draw the 39 00:01:59,280 --> 00:02:03,660 polygon there. So these are the basic 40 00:02:03,660 --> 00:02:06,120 things here, I'd like to stop a 41 00:02:06,120 --> 00:02:10,470 little bit. So who this is called a 42 00:02:10,680 --> 00:02:13,920 quadrant plot, actually, this one here. So 43 00:02:14,280 --> 00:02:16,470 instead of passing a circle whole line, 44 00:02:16,680 --> 00:02:19,680 you'll pass a quad. What this consists 45 00:02:19,680 --> 00:02:23,700 of is the top so, the upper 46 00:02:23,700 --> 00:02:26,910 border or fewer quadrant. So for 47 00:02:26,910 --> 00:02:28,530 instance, this very first quadrant 48 00:02:28,530 --> 00:02:32,550 here has a top border of 2, and a bottom of 49 00:02:32,550 --> 00:02:36,180 1, so its border with 1 and 2, and 50 00:02:36,180 --> 00:02:40,380 then a left would be 1 and right 51 00:02:40,410 --> 00:02:46,410 1.2. So 1 left, and 1.2 right. And 52 00:02:46,410 --> 00:02:48,870 then you have the next quadrant, which 53 00:02:48,870 --> 00:02:51,210 is this one here, with its coordinates 54 00:02:51,210 --> 00:02:55,620 as well and so on. Here's the colors, so you 55 00:02:55,620 --> 00:02:58,470 can use CSS color codes, if you want. 56 00:02:58,530 --> 00:03:01,380 Besides using color strings, 57 00:03:01,380 --> 00:03:04,099 like red and orange, and yellow, and so on. 58 00:03:04,513 --> 00:03:07,080 So the reason I stopped this plot 59 00:03:07,080 --> 00:03:09,540 is that we'll be using this plot to 60 00:03:09,540 --> 00:03:12,510 actually visualize the times for our 61 00:03:12,510 --> 00:03:16,020 video program. So the times when an 62 00:03:16,020 --> 00:03:18,750 object enters the video frame, when the 63 00:03:18,750 --> 00:03:20,580 object exits the video frame. So it 64 00:03:20,580 --> 00:03:22,290 would be great if you start thinking 65 00:03:22,290 --> 00:03:25,860 about this now, how you're going to use 66 00:03:25,860 --> 00:03:27,570 make use of the CSV file that we 67 00:03:27,570 --> 00:03:30,150 generated in the video program earlier, 68 00:03:30,660 --> 00:03:33,540 upload that file in a similar graph, 69 00:03:33,780 --> 00:03:36,300 like this one. So there are some 70 00:03:36,300 --> 00:03:38,370 tricks there. And I don't expect you 71 00:03:38,370 --> 00:03:41,070 to fully solve this, but it's good to 72 00:03:41,070 --> 00:03:44,370 think about that. And you also have this 73 00:03:45,030 --> 00:03:47,670 gallery here. So the Bokeh gallery. 74 00:03:48,720 --> 00:03:51,900 Here you have some beautiful plots. So 75 00:03:51,900 --> 00:03:54,570 you've got the histogram, if you click 76 00:03:54,570 --> 00:03:58,230 one of these, so for instance, how to 77 00:03:58,230 --> 00:04:01,800 make this map. So you can simply copy 78 00:04:01,800 --> 00:04:03,540 this code and paste it in your script 79 00:04:03,540 --> 00:04:05,940 and run it and you'll get the same map. 80 00:04:06,270 --> 00:04:08,670 That's what I wanted to teach you about 81 00:04:08,670 --> 00:04:11,670 Bokeh, and we'll be using it later, as 82 00:04:11,670 --> 00:04:15,060 I said, for visualizing this times when 83 00:04:15,060 --> 00:04:17,280 an object is moving in our video frame 84 00:04:17,400 --> 00:04:21,056 in front of our webcam. So I'll talk to you later.