1 00:00:01,500 --> 00:00:05,680 In the last few videos, 2 00:00:05,680 --> 00:00:10,140 we covered how to calculate and export images It's important to remember that 3 00:00:10,140 --> 00:00:14,890 the end goal to most data analysis projects is to share your findings. 4 00:00:14,890 --> 00:00:17,080 Let's make charts easier to read, and prettier. 5 00:00:18,130 --> 00:00:20,740 We're gonna work on creating printable reports that you can share. 6 00:00:22,310 --> 00:00:26,900 First, let's label our chart so that your reader knows what's being displayed, and 7 00:00:26,900 --> 00:00:29,530 to better understand what data was measured. 8 00:00:29,530 --> 00:00:30,840 Here's what I mean. 9 00:00:30,840 --> 00:00:31,650 See this chart. 10 00:00:32,740 --> 00:00:35,220 It's hard to tell what's being measured, right? 11 00:00:35,220 --> 00:00:37,620 Let's take a look at the chart again with labels. 12 00:00:38,740 --> 00:00:43,015 Now we know what the units of measures were and also what the chart is above. 13 00:00:43,015 --> 00:00:45,430 Matplotlib provides you with some functions for 14 00:00:45,430 --> 00:00:50,750 editing the look of the chart, including the title, the tables, and the legend. 15 00:00:50,750 --> 00:00:55,920 Let's revisit code from stage five that creates a line chart in the function 16 00:00:55,920 --> 00:00:56,810 create line chart. 17 00:01:02,140 --> 00:01:05,670 The highlighted lines here in the code show in context 18 00:01:05,670 --> 00:01:10,025 how to set the values of the title and the axis labels. 19 00:01:10,025 --> 00:01:14,335 Matplotlib needs you to create a chart first before editing these properties. 20 00:01:14,335 --> 00:01:21,708 [BLANK_AUDIO] 21 00:01:21,708 --> 00:01:27,962 If I set the x as, this is the x, 22 00:01:27,962 --> 00:01:33,505 and the y as, this is the y, 23 00:01:33,505 --> 00:01:37,797 [BLANK_AUDIO] 24 00:01:37,797 --> 00:01:40,003 we can try calling the function again. 25 00:01:40,003 --> 00:01:45,206 [SOUND] This is the typo, 26 00:01:45,206 --> 00:01:53,791 and that would be the second argument, 27 00:01:53,791 --> 00:01:57,703 so we would have. 28 00:01:57,703 --> 00:01:59,690 Let's call this labels dot png. 29 00:02:01,980 --> 00:02:03,860 And the data that we want to pass in. 30 00:02:05,090 --> 00:02:06,795 Let's try J Crew ties. 31 00:02:06,795 --> 00:02:12,114 [SOUND] Oh, 32 00:02:12,114 --> 00:02:17,433 we need a. 33 00:02:17,433 --> 00:02:24,126 Import that. 34 00:02:24,126 --> 00:02:29,709 [SOUND] 35 00:02:29,709 --> 00:02:36,409 Get the 36 00:02:36,409 --> 00:02:43,109 prices 37 00:02:43,109 --> 00:02:49,811 of. 38 00:02:49,811 --> 00:02:51,666 List comprehension. 39 00:02:51,666 --> 00:03:01,666 [BLANK_AUDIO] 40 00:03:14,344 --> 00:03:17,130 We have to download this work space to see the file. 41 00:03:39,440 --> 00:03:42,730 So we have this as a title and number of ties and type arrays. 42 00:03:48,770 --> 00:03:51,115 So there's one thing we need to do here that's different. 43 00:03:51,115 --> 00:03:56,062 [SOUND] Let's do it too, that way we make sure 44 00:03:56,062 --> 00:04:01,012 that's it's this one function that we just 45 00:04:01,012 --> 00:04:05,446 wrote not calling the one from before. 46 00:04:05,446 --> 00:04:07,323 So we wanna set. 47 00:04:07,323 --> 00:04:12,560 These custom values, so let's, let's see what happens when we create that. 48 00:04:12,560 --> 00:04:14,287 Let's download the work space again. 49 00:04:14,287 --> 00:04:24,287 [BLANK_AUDIO] 50 00:04:27,221 --> 00:04:30,207 We can see that the values have changed. 51 00:04:30,207 --> 00:04:33,789 This is the title, this is the x, and this is the y.