title
Python - Matplotlib Tutorial for Beginners

description
Matplotlib is one of the most popular libraries to visualize data in Python. Let’s get started with it in this video! ---------- Get Started with Data Analysis in Python: https://academind.com/learn/python/data-analysis-with-python/ More about “pyplot”: https://matplotlib.org/tutorials/introductory/pyplot.html#sphx-glr-tutorials-introductory-pyplot-py Figures, Axes and Axis: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py Tick Locating & Formatting: https://matplotlib.org/api/ticker_api.html Want to learn something totally different? Check out all other courses: https://academind.com/learn/our-courses ---------- • You can follow Max on Twitter (@maxedapps). • And you should of course also follow @academind_real. • You can also find us on Facebook.(https://www.facebook.com/academindchannel/) • Or visit our Website (https://www.academind.com) and subscribe to our newsletter! See you in the videos! ---------- Academind is your source for online education in the areas of web development, frontend web development, backend web development, programming, coding and data science! No matter if you are looking for a tutorial, a course, a crash course, an introduction, an online tutorial or any related video, we try our best to offer you the content you are looking for. Our topics include Angular, React, Vue, Html, CSS, JavaScript, TypeScript, Redux, Nuxt.js, RxJs, Bootstrap, Laravel, Node.js, Progressive Web Apps (PWA), Ionic, React Native, Regular Expressions (RegEx), Stencil, Power BI, Amazon Web Services (AWS), Firebase or other topics, make sure to have a look at this channel or at academind.com to find the learning resource of your choice!

detail
{'title': 'Python - Matplotlib Tutorial for Beginners', 'heatmap': [{'end': 809.859, 'start': 788.237, 'weight': 0.773}, {'end': 1267.529, 'start': 1246.036, 'weight': 1}], 'summary': 'Tutorial on matplotlib for beginners covers the basics of using matplotlib in python for data visualization, including installation, usage in jupyter notebook, creating line charts, customizing charts, plotting grid-based charts, and creating subplots and scatter charts for apple and microsoft stock prices from 2014 to 2018.', 'chapters': [{'end': 203.662, 'segs': [{'end': 35.909, 'src': 'embed', 'start': 2.423, 'weight': 0, 'content': [{'end': 3.764, 'text': 'welcome to this video.', 'start': 2.423, 'duration': 1.341}, {'end': 8.968, 'text': 'another video about the python data analysis basics.', 'start': 3.764, 'duration': 5.204}, {'end': 12.45, 'text': 'in this video we will have a look at matplotlib.', 'start': 8.968, 'duration': 3.482}, {'end': 22.177, 'text': 'matplotlib is one of the most popular libraries for python when it comes to data visualization, so to creating charts in the end.', 'start': 12.45, 'duration': 9.727}, {'end': 24.859, 'text': "so let's get started with this library in this video.", 'start': 22.177, 'duration': 2.682}, {'end': 35.909, 'text': 'To get started, you need Python installed on your machine, you need a Jupyter notebook and you need matplotlib installed.', 'start': 28.786, 'duration': 7.123}], 'summary': 'Introduction to matplotlib for python data visualization.', 'duration': 33.486, 'max_score': 2.423, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk2423.jpg'}, {'end': 157.328, 'src': 'embed', 'start': 83.18, 'weight': 1, 'content': [{'end': 88.784, 'text': 'This is required if you use a Python-free notebook, which is the case for us right here.', 'start': 83.18, 'duration': 5.604}, {'end': 90.365, 'text': 'As you can see right here, Python-free.', 'start': 89.004, 'duration': 1.361}, {'end': 96.849, 'text': 'Because we want to display the charts we create inline in our notebook and not in a separate window.', 'start': 90.965, 'duration': 5.884}, {'end': 100.612, 'text': 'Therefore, you simply have to add the percentage sign right here.', 'start': 97.149, 'duration': 3.463}, {'end': 102.933, 'text': 'And now matplotlib.', 'start': 101.072, 'duration': 1.861}, {'end': 105.095, 'text': 'Oops, plotlib.', 'start': 103.714, 'duration': 1.381}, {'end': 108.218, 'text': 'space in line.', 'start': 106.236, 'duration': 1.982}, {'end': 108.958, 'text': 'this is it.', 'start': 108.218, 'duration': 0.74}, {'end': 114.664, 'text': 'if you now hit shift and enter, we are ready to get started with matplotlib.', 'start': 108.958, 'duration': 5.706}, {'end': 119.169, 'text': 'now the focus of this video is on the very basics of matplotlib.', 'start': 114.664, 'duration': 4.505}, {'end': 122.592, 'text': "therefore, i don't want to use any external data.", 'start': 119.169, 'duration': 3.423}, {'end': 126.176, 'text': 'i just quickly enter some hard-coded real data, though right here.', 'start': 122.592, 'duration': 3.584}, {'end': 129.777, 'text': 'The data I prepared is about stock prices.', 'start': 126.856, 'duration': 2.921}, {'end': 133.12, 'text': "Not really spectacular, I would say, but it's enough for our purposes.", 'start': 130.058, 'duration': 3.062}, {'end': 136.962, 'text': "So let's add the Apple price right here, maybe like this.", 'start': 133.68, 'duration': 3.282}, {'end': 140.664, 'text': 'Equals and now create a list right here.', 'start': 138.643, 'duration': 2.021}, {'end': 146.247, 'text': 'And now I have to look up the values, so I will forward the video a bit to let you type the numbers on your own.', 'start': 141.064, 'duration': 5.183}, {'end': 148.625, 'text': "So that's the first thing.", 'start': 147.685, 'duration': 0.94}, {'end': 152.206, 'text': 'These are the stock prices of the Apple stock.', 'start': 148.905, 'duration': 3.301}, {'end': 157.328, 'text': 'And I took the prices all round about mid-November of the corresponding year.', 'start': 152.667, 'duration': 4.661}], 'summary': 'Using matplotlib in a python-free notebook, displaying stock prices inline, for basic data visualization.', 'duration': 74.148, 'max_score': 83.18, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk83180.jpg'}], 'start': 2.423, 'title': 'Matplotlib for data visualization', 'summary': 'Covers the basics of using matplotlib to visualize data in python, emphasizing its installation and usage in jupyter notebook, and covers data entry of apple and microsoft stock prices from 2014 to 2018 for visualization purposes.', 'chapters': [{'end': 50.835, 'start': 2.423, 'title': 'Matplotlib for data visualization', 'summary': 'Introduces matplotlib, one of the most popular libraries for data visualization in python, emphasizing the importance of its installation and usage in jupyter notebook for creating charts.', 'duration': 48.412, 'highlights': ['Matplotlib is one of the most popular libraries for Python when it comes to data visualization, emphasizing its significance in the Python ecosystem.', 'Importing matplotlib to the project is crucial for getting started with data visualization in Python, highlighting the initial step in utilizing the library.']}, {'end': 133.12, 'start': 51.718, 'title': 'Introduction to matplotlib', 'summary': 'Introduces the basics of using matplotlib to create charts in python, including importing the module, setting up for inline chart display, and using hard-coded real data for stock prices.', 'duration': 81.402, 'highlights': ['Importing Matplotlib and setting up for inline chart display by importing PyPlot as PLT and adding the percentage sign to display charts inline.', 'Introduction to the basics of Matplotlib for creating charts in Python, with a focus on using hard-coded real data for stock prices.']}, {'end': 203.662, 'start': 133.68, 'title': 'Stock prices data entry', 'summary': 'Covers data entry of apple and microsoft stock prices from 2014 to 2018, taken around mid-november, for visualization purposes.', 'duration': 69.982, 'highlights': ['Data entry of Apple and Microsoft stock prices from 2014 to 2018 is demonstrated, around mid-November of the corresponding year.', 'The chapter emphasizes the process of creating lists and inputting values for the stock prices, with a focus on visualization.', 'The video tutorial forwards through the process of typing numbers for the stock prices, providing a hands-on learning experience.']}], 'duration': 201.239, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk2423.jpg', 'highlights': ['Matplotlib is one of the most popular libraries for Python when it comes to data visualization, emphasizing its significance in the Python ecosystem.', 'Importing Matplotlib and setting up for inline chart display by importing PyPlot as PLT and adding the percentage sign to display charts inline.', 'Data entry of Apple and Microsoft stock prices from 2014 to 2018 is demonstrated, around mid-November of the corresponding year.', 'The chapter emphasizes the process of creating lists and inputting values for the stock prices, with a focus on visualization.']}, {'end': 674.189, 'segs': [{'end': 252.031, 'src': 'embed', 'start': 204.023, 'weight': 0, 'content': [{'end': 209.468, 'text': 'And the easiest way to do so is to simply create a simple line chart.', 'start': 204.023, 'duration': 5.445}, {'end': 211.969, 'text': 'We can do this by simply typing plt.', 'start': 209.807, 'duration': 2.162}, {'end': 217.594, 'text': 'You remember we imported matplotlib, so the pyplot submodule as plt.', 'start': 212.109, 'duration': 5.485}, {'end': 220.196, 'text': 'So plt.plot.', 'start': 218.214, 'duration': 1.982}, {'end': 226.702, 'text': 'This simply means that we want to use this submodule to create a line chart.', 'start': 220.757, 'duration': 5.945}, {'end': 228.604, 'text': "That's basically what this is telling us.", 'start': 226.982, 'duration': 1.622}, {'end': 234.389, 'text': 'Now for this line chart, we need data and we defined the data in our variables up here.', 'start': 229.244, 'duration': 5.145}, {'end': 241.725, 'text': 'So if we now simply open the brackets right here and now enter the value for our X axis.', 'start': 234.729, 'duration': 6.996}, {'end': 245.948, 'text': "That's the first value right here, which could be the years in our case.", 'start': 241.925, 'duration': 4.023}, {'end': 246.808, 'text': 'So this one right here.', 'start': 246.068, 'duration': 0.74}, {'end': 249.23, 'text': 'So we simply type year like that.', 'start': 247.468, 'duration': 1.762}, {'end': 252.031, 'text': 'And now we enter the values for our Y axis.', 'start': 249.81, 'duration': 2.221}], 'summary': 'Create a line chart using matplotlib module to plot x and y axis data.', 'duration': 48.008, 'max_score': 204.023, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk204023.jpg'}, {'end': 364.924, 'src': 'embed', 'start': 333.707, 'weight': 1, 'content': [{'end': 335.228, 'text': 'all our things that should be displayed.', 'start': 333.707, 'duration': 1.521}, {'end': 339.17, 'text': 'and as a last step, we tell python and now please show our final chart.', 'start': 335.228, 'duration': 3.942}, {'end': 345.853, 'text': 'Now I talked about the labels, so we can simply add a label by typing plt.xlabel.', 'start': 339.89, 'duration': 5.963}, {'end': 347.594, 'text': 'Again, really simple.', 'start': 346.694, 'duration': 0.9}, {'end': 350.316, 'text': 'Now we could give our x label a name.', 'start': 348.095, 'duration': 2.221}, {'end': 353.157, 'text': 'I think a good name would be year, for example, for the x label.', 'start': 350.576, 'duration': 2.581}, {'end': 356.579, 'text': 'And now we plot our y label also.', 'start': 353.618, 'duration': 2.961}, {'end': 359.801, 'text': 'And a good name right here could be maybe stock price.', 'start': 356.779, 'duration': 3.022}, {'end': 361.022, 'text': 'Something like that.', 'start': 360.401, 'duration': 0.621}, {'end': 364.924, 'text': "And don't forget these single quotation marks as I just did it.", 'start': 361.502, 'duration': 3.422}], 'summary': "Demonstrates how to add labels to a chart using python, with an example of labeling the x-axis as 'year' and the y-axis as 'stock price'.", 'duration': 31.217, 'max_score': 333.707, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk333707.jpg'}, {'end': 662.325, 'src': 'embed', 'start': 633.529, 'weight': 2, 'content': [{'end': 637.271, 'text': 'And now we have to define the minimum value and the maximum value for the y-axis.', 'start': 633.529, 'duration': 3.742}, {'end': 642.294, 'text': 'Now, the minimum value could be right here, maybe something like 20.', 'start': 637.792, 'duration': 4.502}, {'end': 647.597, 'text': "and the maximum value could be let's say something like 180.", 'start': 642.294, 'duration': 5.303}, {'end': 654.181, 'text': 'If we do that and hit shift and enter, you can see that we indeed changed our x and y axis values.', 'start': 647.597, 'duration': 6.584}, {'end': 662.325, 'text': 'we start with 2014 right here, 13 right here, and we end with 2019, and we start with 20 and go up to 180..', 'start': 654.181, 'duration': 8.144}], 'summary': 'Defined y-axis with min at 20 and max at 180.', 'duration': 28.796, 'max_score': 633.529, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk633529.jpg'}], 'start': 204.023, 'title': 'Creating and customizing line charts in python', 'summary': 'Explains how to create a simple line chart in python using the matplotlib pyplot submodule, using the years as the x-axis and apple stock prices as the y-axis, and then displaying the chart using plt.show. it also discusses customizing charts in python, including adding labels, displaying multiple stock prices, changing line styles and colors, and defining limits for the x and y axes.', 'chapters': [{'end': 293.91, 'start': 204.023, 'title': 'Creating line chart in python', 'summary': 'Explains how to create a simple line chart in python using the matplotlib pyplot submodule, using the years as the x-axis and apple stock prices as the y-axis, and then displaying the chart using plt.show.', 'duration': 89.887, 'highlights': ["The chapter explains how to create a simple line chart using matplotlib's pyplot submodule by defining X-axis and Y-axis data and displaying the chart using plt.show.", 'The process involves using the years as the X-axis and the Apple stock prices as the Y-axis data to create the line chart.']}, {'end': 674.189, 'start': 294.49, 'title': 'Customizing chart in python', 'summary': 'Discusses customizing charts in python, including adding labels, displaying multiple stock prices, changing line styles and colors, and defining limits for the x and y axes.', 'duration': 379.699, 'highlights': ['The chapter discusses customizing charts in Python, including adding labels, displaying multiple stock prices, changing line styles and colors, and defining limits for the x and y axes. Customizing charts, adding labels, displaying multiple stock prices, changing line styles and colors, defining limits for x and y axes', "The chapter explains how to add x and y labels to the chart using plt.xlabel and plt.ylabel, providing examples like 'year' for x label and 'stock price' for y label. Adding x and y labels using plt.xlabel and plt.ylabel with examples", 'The chapter demonstrates displaying multiple stock prices in a single chart by using plt.plot for each stock and changing the line style and color, such as changing Apple to black and Microsoft to green. Displaying multiple stock prices in a single chart and changing line style and color', 'The chapter explains how to change the line style using plt.plot, including examples of dashed line and scatter style, and provides additional resources for different line styles. Changing line style using plt.plot with examples and additional resources', 'The chapter discusses defining limits for the x and y axes using plt.axis and creating a list of values for the minimum and maximum values for both axes, and demonstrates the impact of the changes. Defining limits for x and y axes using plt.axis and creating a list of values for minimum and maximum values']}], 'duration': 470.166, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk204023.jpg', 'highlights': ["The chapter explains how to create a simple line chart using matplotlib's pyplot submodule by defining X-axis and Y-axis data and displaying the chart using plt.show.", 'The chapter discusses customizing charts in Python, including adding labels, displaying multiple stock prices, changing line styles and colors, and defining limits for the x and y axes.', 'The chapter demonstrates displaying multiple stock prices in a single chart by using plt.plot for each stock and changing the line style and color, such as changing Apple to black and Microsoft to green.', "The chapter explains how to add x and y labels to the chart using plt.xlabel and plt.ylabel, providing examples like 'year' for x label and 'stock price' for y label.", 'The chapter discusses defining limits for the x and y axes using plt.axis and creating a list of values for the minimum and maximum values for both axes, and demonstrates the impact of the changes.', 'The process involves using the years as the X-axis and the Apple stock prices as the Y-axis data to create the line chart.', 'The chapter explains how to change the line style using plt.plot, including examples of dashed line and scatter style, and provides additional resources for different line styles.']}, {'end': 1333.139, 'segs': [{'end': 701.081, 'src': 'embed', 'start': 674.189, 'weight': 4, 'content': [{'end': 681.21, 'text': 'so we can simply comment this out with the hashtag and now simply get back our initial chart style.', 'start': 674.189, 'duration': 7.021}, {'end': 685.233, 'text': 'And these are actually the basics for our basic plotting logic right here.', 'start': 681.671, 'duration': 3.562}, {'end': 690.055, 'text': "So simply using that plt.plot, create the line chart, and then we're playing around with it.", 'start': 685.373, 'duration': 4.682}, {'end': 694.077, 'text': 'The thing is that PyPlot is a lot more powerful than that.', 'start': 690.636, 'duration': 3.441}, {'end': 701.081, 'text': 'And the general logic behind PyPlot is not just this simple plotting thing right here.', 'start': 694.858, 'duration': 6.223}], 'summary': "Using plt.plot to create line chart and exploring pyplot's power.", 'duration': 26.892, 'max_score': 674.189, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk674189.jpg'}, {'end': 822.123, 'src': 'heatmap', 'start': 788.237, 'weight': 0.773, 'content': [{'end': 793.162, 'text': 'We can open the brackets and now we have the option to add an integer right here.', 'start': 788.237, 'duration': 4.925}, {'end': 798.207, 'text': 'This will basically add this number to the figure and hold it as a number attribute.', 'start': 793.743, 'duration': 4.464}, {'end': 800.349, 'text': 'So we could add one right here, for example.', 'start': 798.287, 'duration': 2.062}, {'end': 809.859, 'text': 'And now we can also add another option, which is the so-called fig size, the figure size which basically defines the space of our figure, which,', 'start': 800.85, 'duration': 9.009}, {'end': 812.081, 'text': 'in the end, will contain all our charts.', 'start': 809.859, 'duration': 2.222}, {'end': 822.123, 'text': 'The fix size is defined like this so you type fix size and set it equal to 6.4 and 4.8.', 'start': 812.677, 'duration': 9.446}], 'summary': 'Options to add integer and define figure size in the code, e.g. add 1 and set fix size to 6.4 and 4.8.', 'duration': 33.886, 'max_score': 788.237, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk788237.jpg'}, {'end': 1010.263, 'src': 'embed', 'start': 977.056, 'weight': 5, 'content': [{'end': 980.278, 'text': "That's why I will stick to figure, chart and axis.", 'start': 977.056, 'duration': 3.222}, {'end': 981.618, 'text': "I think that's a lot easier.", 'start': 980.478, 'duration': 1.14}, {'end': 988.282, 'text': 'Now, the problem is that our charts are now basically available as kind of raw templates, you could say,', 'start': 982.279, 'duration': 6.003}, {'end': 990.484, 'text': "but they don't contain any kind of information.", 'start': 988.282, 'duration': 2.202}, {'end': 991.665, 'text': 'for that.', 'start': 991.064, 'duration': 0.601}, {'end': 998.051, 'text': 'we can simply change that by now referring to chart one right here.', 'start': 991.665, 'duration': 6.386}, {'end': 1003.436, 'text': "like that, add a dot and now we'll basically do what we learned before.", 'start': 998.051, 'duration': 5.385}, {'end': 1010.263, 'text': 'we can simply enter dot plot and now we simply have to add our data that we want to display.', 'start': 1003.436, 'duration': 6.827}], 'summary': 'The speaker plans to use figure, chart, and axis to display data, making the process easier.', 'duration': 33.207, 'max_score': 977.056, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk977056.jpg'}, {'end': 1150.98, 'src': 'embed', 'start': 1125.361, 'weight': 0, 'content': [{'end': 1130.644, 'text': 'So we have this grid structure and we can define the position of our charts in there.', 'start': 1125.361, 'duration': 5.283}, {'end': 1134.307, 'text': 'but we can also create different grids.', 'start': 1131.925, 'duration': 2.382}, {'end': 1138.27, 'text': 'we could, for example, say we want to have two rows and two columns.', 'start': 1134.307, 'duration': 3.963}, {'end': 1142.594, 'text': 'if we do this and hit shift and enter, you can see that nothing changes on the first side.', 'start': 1138.27, 'duration': 4.324}, {'end': 1150.98, 'text': 'but the height of our two charts decreased, of course, because, remember, we defined the size of our figure up here.', 'start': 1142.594, 'duration': 8.386}], 'summary': 'Grid structure allows defining chart positions. creating 2x2 grid decreases chart height.', 'duration': 25.619, 'max_score': 1125.361, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk1125361.jpg'}, {'end': 1272.273, 'src': 'heatmap', 'start': 1246.036, 'weight': 1, 'content': [{'end': 1250.859, 'text': 'lib dot ticker, because we want to have an impact onto our data ticks,', 'start': 1246.036, 'duration': 4.823}, {'end': 1258.364, 'text': 'onto our tickers down there and we want to import the max and locator like that.', 'start': 1250.859, 'duration': 7.505}, {'end': 1264.788, 'text': "let's hit, shift and enter, let's go down and let's have a look at the documentation to see what i actually did right here.", 'start': 1258.364, 'duration': 6.424}, {'end': 1265.708, 'text': 'so here we are.', 'start': 1264.788, 'duration': 0.92}, {'end': 1267.529, 'text': 'link can be found in the video description.', 'start': 1265.708, 'duration': 1.821}, {'end': 1272.273, 'text': 'And well, you can see right here what we can do with this ticker.', 'start': 1268.75, 'duration': 3.523}], 'summary': 'Using lib dot ticker to impact data ticks, importing max and locator, and exploring documentation for functionality.', 'duration': 26.237, 'max_score': 1246.036, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk1246036.jpg'}, {'end': 1320.649, 'src': 'embed', 'start': 1289.785, 'weight': 1, 'content': [{'end': 1292.127, 'text': 'this is actually totally enough and all we need.', 'start': 1289.785, 'duration': 2.342}, {'end': 1302.174, 'text': 'because if we now go back to our jupiter notebook, right here back in the chart, so down here and now maybe right here below our apple price,', 'start': 1292.127, 'duration': 10.047}, {'end': 1310.861, 'text': 'so say apple underscore price dot tab, If you now type X, you can see that we can refer to the X axis.', 'start': 1302.174, 'duration': 8.687}, {'end': 1311.682, 'text': "So let's hit enter.", 'start': 1310.901, 'duration': 0.781}, {'end': 1315.425, 'text': 'Now add another dot and type S.', 'start': 1312.482, 'duration': 2.943}, {'end': 1320.649, 'text': 'And if you now scroll down a bit, you can see that we have our major locator right here.', 'start': 1315.425, 'duration': 5.224}], 'summary': "Using 'apple_price.x' and 's', access x-axis major locator in jupyter notebook.", 'duration': 30.864, 'max_score': 1289.785, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk1289785.jpg'}], 'start': 674.189, 'title': 'Plotting and creating grid-based charts in python', 'summary': 'Introduces the basics of plotting logic with pyplot and demonstrates creating grid-based charts in python using matplotlib, emphasizing figure creation, axes, subplots positioning, and tick formatting.', 'chapters': [{'end': 785.456, 'start': 674.189, 'title': 'Plotting basics with pyplot', 'summary': 'Introduces the basics of plotting logic with pyplot, emphasizing the concept of figures, axes, and their corresponding visual content, and demonstrates how to create a figure step by step using plt.figure method.', 'duration': 111.267, 'highlights': ['PyPlot emphasizes the concept of figures, axes, and their corresponding visual content PyPlot is not just about simple plotting, it involves thinking in figures, axes, and the content of the chart, which defines the entire space where the charts are displayed.', 'Demonstrates how to create a figure step by step using plt.figure method The process of creating a figure step by step using plt.figure method is demonstrated, emphasizing the importance of understanding how PyPlot works.', 'Introduction to basic plotting logic with PyPlot The basics of plotting logic with PyPlot are introduced, including using plt.plot to create a line chart and understanding the power of PyPlot.']}, {'end': 1333.139, 'start': 785.456, 'title': 'Creating grid-based charts in python', 'summary': 'Explains how to create grid-based charts in python using matplotlib, defining figure size and positioning subplots, and using tick locator to format data ticks.', 'duration': 547.683, 'highlights': ['The chapter explains how to create grid-based charts in Python using Matplotlib. The chapter covers the process of creating grid-based charts using the Matplotlib library in Python.', 'Defining figure size and positioning subplots is demonstrated. The process of defining the figure size and positioning subplots within the grid is explained, with the default values of 6.4 and 4.8 for width and height being utilized as an example.', 'Using tick locator to format data ticks is illustrated. The usage of the tick locator to format data ticks is demonstrated, with an emphasis on configuring tick locating and formatting for the data set.']}], 'duration': 658.95, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk674189.jpg', 'highlights': ['PyPlot emphasizes the concept of figures, axes, and their corresponding visual content', 'Introduction to basic plotting logic with PyPlot', 'Demonstrates how to create a figure step by step using plt.figure method', 'The chapter explains how to create grid-based charts in Python using Matplotlib', 'Defining figure size and positioning subplots is demonstrated', 'Using tick locator to format data ticks is illustrated']}, {'end': 1641.575, 'segs': [{'end': 1435.126, 'src': 'embed', 'start': 1403.156, 'weight': 0, 'content': [{'end': 1403.577, 'text': 'Like that.', 'start': 1403.156, 'duration': 0.421}, {'end': 1407.28, 'text': 'And now add a comma and add axis right here.', 'start': 1404.377, 'duration': 2.903}, {'end': 1412.345, 'text': 'So, basically, we want to create a figure, and this figure should contain some axis,', 'start': 1407.74, 'duration': 4.605}, {'end': 1415.768, 'text': 'without diving too much into the code behind and how this logically works.', 'start': 1412.345, 'duration': 3.423}, {'end': 1417.749, 'text': 'This is basically what is written right here.', 'start': 1416.088, 'duration': 1.661}, {'end': 1430.363, 'text': 'We can now set this equal to plt.subplots because we want to add multiple plots to our figure right here.', 'start': 1418.53, 'duration': 11.833}, {'end': 1435.126, 'text': 'now we can define the grid size.', 'start': 1431.764, 'duration': 3.362}], 'summary': 'Creating a figure with axes and setting grid size using plt.subplots.', 'duration': 31.97, 'max_score': 1403.156, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk1403156.jpg'}, {'end': 1575.553, 'src': 'embed', 'start': 1549.758, 'weight': 1, 'content': [{'end': 1559.546, 'text': 'now we got it and you can also refer to the chart with the index number of one in our figure right here by adding dot plot,', 'start': 1549.758, 'duration': 9.788}, {'end': 1562.448, 'text': 'maybe year and apple price.', 'start': 1559.546, 'duration': 2.902}, {'end': 1567.146, 'text': 'that hit shift and enter and you can see it works fine.', 'start': 1563.482, 'duration': 3.664}, {'end': 1575.553, 'text': 'if i would increase it now to a 2.2 grid, i get an error because i need to be more precise about the index, because here we have the row index zero,', 'start': 1567.146, 'duration': 8.407}], 'summary': 'Using index numbers, a chart can be referred to and displayed in a grid format, with some precision issues encountered.', 'duration': 25.795, 'max_score': 1549.758, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk1549758.jpg'}], 'start': 1333.139, 'title': 'Creating subplots and scatter charts with matplotlib', 'summary': 'Covers creating subplots for apple and microsoft stock prices, formatting x-axis tick marks to integers, defining grid size and figure size, and using matplotlib to create scatter charts in python, providing convenience, flexibility, and power in data visualization.', 'chapters': [{'end': 1430.363, 'start': 1333.139, 'title': 'Creating subplots with matplotlib', 'summary': 'Demonstrates how to format x-axis tick marks to integers using matplotlib, creating subplots for apple and microsoft stock prices, and a quicker way to create subplots using plt.subplots.', 'duration': 97.224, 'highlights': ['Using plt.subplots to create subplots is a quicker method for adding multiple plots to a figure, saving time and making the process more convenient.', 'Formatting the x-axis tick marks to integers improves the readability and aesthetics of the plot, enhancing the visual representation of the data.', 'Demonstrating the process of creating subplots for Apple and Microsoft stock prices showcases the practical application of the matplotlib library in visualizing financial data.']}, {'end': 1528.533, 'start': 1431.764, 'title': 'Creating subplots with grids in matplotlib', 'summary': 'Demonstrates how to define grid size and figure size in matplotlib, allowing for quick creation of subplots with one single line of code, providing convenience and flexibility in adjusting grid structures and available space for plots.', 'duration': 96.769, 'highlights': ['The chapter shows how to create a 1.2 grid and define the fig size as 20.5, enabling the creation of subplots with one single line of code, providing convenience.', 'It demonstrates how to adjust the grid structure by changing the rows and columns, allowing for flexibility in creating different grid layouts.', 'The tutorial explains how changing the figure size affects the available space for plots, providing more space for displaying charts and allowing for nice formatting.', 'It highlights the ability to refer to different subplots and customize them, such as converting a chart to a scatter chart by referring to the chart index.']}, {'end': 1641.575, 'start': 1528.533, 'title': 'Introduction to matplotlib', 'summary': 'Introduces how to use matplotlib to create scatter charts in python, demonstrating how to display data points for microsoft and apple stock prices and emphasizing the ease and power of matplotlib.', 'duration': 113.042, 'highlights': ['The chapter demonstrates how to use Matplotlib to display data for Microsoft and Apple stock prices, emphasizing the ease of use and power of the tool.', 'The speaker explains the need to be precise about the index when displaying data, highlighting the importance of specifying row and column indices for accurate data representation.', 'The video concludes by encouraging viewers to explore the capabilities of Matplotlib further and expresses gratitude for watching, setting the stage for future content.', 'The speaker shows how to refer to the chart using the index number and demonstrates the process of displaying Microsoft and Apple stock prices on the scatter chart.', "The speaker emphasizes the simplicity of using Matplotlib for beginners while hinting at the tool's potential for more advanced functionalities in future videos."]}], 'duration': 308.436, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qErBw-R2Ybk/pics/qErBw-R2Ybk1333139.jpg', 'highlights': ['Using plt.subplots to create subplots is a quicker method for adding multiple plots to a figure, saving time and making the process more convenient.', 'The chapter shows how to create a 1.2 grid and define the fig size as 20.5, enabling the creation of subplots with one single line of code, providing convenience.', 'The chapter demonstrates how to use Matplotlib to display data for Microsoft and Apple stock prices, emphasizing the ease of use and power of the tool.']}], 'highlights': ['Matplotlib is one of the most popular libraries for Python when it comes to data visualization, emphasizing its significance in the Python ecosystem.', 'Importing Matplotlib and setting up for inline chart display by importing PyPlot as PLT and adding the percentage sign to display charts inline.', "The chapter explains how to create a simple line chart using matplotlib's pyplot submodule by defining X-axis and Y-axis data and displaying the chart using plt.show.", 'The chapter discusses customizing charts in Python, including adding labels, displaying multiple stock prices, changing line styles and colors, and defining limits for the x and y axes.', 'The chapter demonstrates displaying multiple stock prices in a single chart by using plt.plot for each stock and changing the line style and color, such as changing Apple to black and Microsoft to green.', "The chapter explains how to add x and y labels to the chart using plt.xlabel and plt.ylabel, providing examples like 'year' for x label and 'stock price' for y label.", 'The chapter discusses defining limits for the x and y axes using plt.axis and creating a list of values for the minimum and maximum values for both axes, and demonstrates the impact of the changes.', 'PyPlot emphasizes the concept of figures, axes, and their corresponding visual content', 'Introduction to basic plotting logic with PyPlot', 'Using plt.subplots to create subplots is a quicker method for adding multiple plots to a figure, saving time and making the process more convenient.', 'The chapter shows how to create a 1.2 grid and define the fig size as 20.5, enabling the creation of subplots with one single line of code, providing convenience.', 'The chapter demonstrates how to use Matplotlib to display data for Microsoft and Apple stock prices, emphasizing the ease of use and power of the tool.']}