title
Matplotlib Tutorial (Part 10): Subplots

description
In this video, we will be learning how to use subplots in Matplotlib. This video is sponsored by Brilliant. Go to https://brilliant.org/cms to sign up for free. Be one of the first 200 people to sign up with this link and get 20% off your premium subscription. In this Python Programming video, we will be learning how to use subplots in Matplotlib. Subplots are used so that we can use Matplotlib in a more object-oriented manner. We will learn how to use subplots to plot data we have seen in previous videos, and then we will learn how to use subplots to create multiple plots on one or more figures. Let's get started... The code from this video (with added logging) can be found at: http://bit.ly/Matplotlib-10 Unpacking Quick Tip - https://youtu.be/C-gEQdGVXbk?t=782 ✅ Support My Channel Through Patreon: https://www.patreon.com/coreyms ✅ Become a Channel Member: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join ✅ One-Time Contribution Through PayPal: https://goo.gl/649HFY ✅ Cryptocurrency Donations: Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3 Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33 Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot ✅ Corey's Public Amazon Wishlist http://a.co/inIyro1 ✅ Equipment I Use and Books I Recommend: https://www.amazon.com/shop/coreyschafer ▶️ You Can Find Me On: My Website - http://coreyms.com/ My Second Channel - https://www.youtube.com/c/coreymschafer Facebook - https://www.facebook.com/CoreyMSchafer Twitter - https://twitter.com/CoreyMSchafer Instagram - https://www.instagram.com/coreymschafer/ #Python #Matplotlib

detail
{'title': 'Matplotlib Tutorial (Part 10): Subplots', 'heatmap': [{'end': 401.382, 'start': 359.33, 'weight': 0.87}, {'end': 440.625, 'start': 409.228, 'weight': 0.76}, {'end': 814.361, 'start': 754.786, 'weight': 0.824}, {'end': 913.973, 'start': 894.678, 'weight': 0.756}, {'end': 1006.692, 'start': 970.375, 'weight': 0.814}], 'summary': 'Tutorial series covers using subplots in pyplot for object-oriented plotting, data visualization with pandas and csv, working with figures and axes in matplotlib, creating multiple axes subplots, and plotting multiple figures with matplotlib, while also mentioning the sponsorship by brilliant.org and future plans for series on the pandas library and stack overflow developer survey data parsing.', 'chapters': [{'end': 56.95, 'segs': [{'end': 56.95, 'src': 'embed', 'start': 20.541, 'weight': 0, 'content': [{'end': 25.323, 'text': "A lot of people prefer to create their plots this way, even if they're only creating a single plot.", 'start': 20.541, 'duration': 4.782}, {'end': 39.549, 'text': "So in this video we're going to see how to create our plots using the subplots method and go back over some of the plots that we created earlier in the series and see what changes need to be made in order to use subplots for those examples.", 'start': 25.943, 'duration': 13.606}, {'end': 45.175, 'text': 'Now I would like to mention that we do have a sponsor for this series of videos and that is Brilliant.org.', 'start': 39.969, 'duration': 5.206}, {'end': 53.686, 'text': 'So I really want to thank Brilliant for sponsoring this series and it would be great if you all could go and check them out using the link in the description section below and support the sponsors.', 'start': 45.476, 'duration': 8.21}, {'end': 56.95, 'text': "And I'll talk more about their services in just a bit.", 'start': 54.126, 'duration': 2.824}], 'summary': 'Learn to create plots using subplots method and thank sponsor brilliant.org.', 'duration': 36.409, 'max_score': 20.541, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU20541.jpg'}], 'start': 0.229, 'title': 'Using subplots in pyplot', 'summary': 'Discusses the benefits of using subplots in pyplot for creating and working with plots in a more object-oriented manner. it also mentions the sponsorship by brilliant.org.', 'chapters': [{'end': 56.95, 'start': 0.229, 'title': 'Using subplots in pyplot', 'summary': 'Discusses the benefits of using subplots in pyplot for creating and working with plots in a more object-oriented manner, and also mentions the sponsorship by brilliant.org.', 'duration': 56.721, 'highlights': ['Creating plots with the subplots method allows for working with plots in a more object-oriented manner and is preferred by many, even for creating a single plot.', 'The video focuses on creating plots using the subplots method and modifying earlier plots to use subplots.', 'The series is sponsored by Brilliant.org, and viewers are encouraged to check out their services via the link in the description.']}], 'duration': 56.721, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU229.jpg', 'highlights': ['Creating plots with the subplots method allows for working with plots in a more object-oriented manner and is preferred by many, even for creating a single plot.', 'The video focuses on creating plots using the subplots method and modifying earlier plots to use subplots.', 'The series is sponsored by Brilliant.org, and viewers are encouraged to check out their services via the link in the description.']}, {'end': 261.476, 'segs': [{'end': 90.22, 'src': 'embed', 'start': 57.29, 'weight': 4, 'content': [{'end': 59.313, 'text': "So with that said, let's go ahead and get started.", 'start': 57.29, 'duration': 2.023}, {'end': 62.775, 'text': "Okay, so I've got some sample code pulled up here in my script.", 'start': 59.873, 'duration': 2.902}, {'end': 69.74, 'text': "And if you've been following along with the series, then you'll likely recognize the other matplotlib code that I have here at the moment.", 'start': 63.215, 'duration': 6.525}, {'end': 72.802, 'text': 'But if not, then let me go over this really quick.', 'start': 70.06, 'duration': 2.742}, {'end': 76.825, 'text': 'So this is actually a plot that I created in the first video of the series.', 'start': 73.122, 'duration': 3.703}, {'end': 81.37, 'text': "But we're loading in this data using a CSV file here instead.", 'start': 77.165, 'duration': 4.205}, {'end': 82.772, 'text': 'Okay, so let me go over this.', 'start': 81.69, 'duration': 1.082}, {'end': 85.255, 'text': "So first we're importing pandas here at the top.", 'start': 83.112, 'duration': 2.143}, {'end': 90.22, 'text': "Then we're also importing the pie plot module from matplotlib.", 'start': 85.615, 'duration': 4.605}], 'summary': 'Python script imports pandas and matplotlib for data visualization.', 'duration': 32.93, 'max_score': 57.29, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU57290.jpg'}, {'end': 165.643, 'src': 'embed', 'start': 141.955, 'weight': 0, 'content': [{'end': 148.282, 'text': "So since we have plt.plot three times, that means that we're going to have three lines on our line plot.", 'start': 141.955, 'duration': 6.327}, {'end': 151.606, 'text': 'So the first plot here is the Python salaries with our label.', 'start': 148.643, 'duration': 2.963}, {'end': 156.111, 'text': 'The next is the JavaScript salaries and then the all developers plot.', 'start': 152.027, 'duration': 4.084}, {'end': 159.876, 'text': "And we're also giving this one a custom color and a dash line style.", 'start': 156.472, 'duration': 3.404}, {'end': 164.081, 'text': 'Then we are printing out the legend so that we know what is what.', 'start': 160.396, 'duration': 3.685}, {'end': 165.643, 'text': "We're giving this a title.", 'start': 164.462, 'duration': 1.181}], 'summary': "Three lines on line plot representing python, javascript, and all developers' salaries with custom styles and legend.", 'duration': 23.688, 'max_score': 141.955, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU141955.jpg'}, {'end': 237.374, 'src': 'embed', 'start': 210.913, 'weight': 1, 'content': [{'end': 218.634, 'text': "OK, so we can see that every time we're doing something with our plot, we are using the PLT object that we imported.", 'start': 210.913, 'duration': 7.721}, {'end': 220.735, 'text': "That's that PI plot object.", 'start': 218.774, 'duration': 1.961}, {'end': 223.878, 'text': 'We never actually created that object ourselves.', 'start': 221.095, 'duration': 2.783}, {'end': 228.684, 'text': 'Now, that might be weird for some people who are used to doing coding in a more object oriented manner.', 'start': 224.299, 'duration': 4.385}, {'end': 232.909, 'text': 'We might think at some point we should have done something like this.', 'start': 229.105, 'duration': 3.804}, {'end': 237.374, 'text': 'So we maybe should have said like PLT is equal to.', 'start': 233.27, 'duration': 4.104}], 'summary': 'The plt object is consistently used for plotting without being explicitly created, which may seem unusual for those accustomed to object-oriented coding.', 'duration': 26.461, 'max_score': 210.913, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU210913.jpg'}], 'start': 57.29, 'title': 'Data visualization with pandas and csv', 'summary': 'Covers loading data from a csv file using pandas, creating plots with matplotlib and seaborn style, and demonstrates plotting median salaries for different age groups using python and javascript, and customizing the plot with labels, title, and legend.', 'chapters': [{'end': 102.532, 'start': 57.29, 'title': 'Matplotlib data visualization with pandas and csv', 'summary': 'Covers the process of loading data from a csv file using pandas and creating a plot with matplotlib, using seaborn style for improved visuals. it also mentions the familiarity of the code for those following the series.', 'duration': 45.242, 'highlights': ['Loading data from a CSV file using pandas read CSV method and creating a plot with matplotlib.', 'Using seaborn style for improved visuals in the plots.', 'Mentioning the familiarity of the code for those following the series.']}, {'end': 261.476, 'start': 102.913, 'title': 'Plotting median salaries from csv data', 'summary': 'Demonstrates plotting median salaries for different age groups from a csv file, using python, javascript, and all developers data, and customizing the plot with labels, title, and legend.', 'duration': 158.563, 'highlights': ['Plotting median salaries for different age groups from a CSV file using Python, JavaScript, and all developers data The Python, JavaScript, and all developers median salaries for different age groups are plotted using plt.plot, resulting in a line plot with three lines.', 'Customizing the plot with labels, title, and legend The plot is customized with a title, X and Y labels, and a legend to differentiate the plotted lines.', 'Exploring stateful plotting and the use of PLT object for plot manipulation The chapter delves into stateful plotting, utilizing the PLT object without creating a new instance of a plot, as well as discussing the current state of the PLT object in terms of the working figure.']}], 'duration': 204.186, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU57290.jpg', 'highlights': ['Plotting median salaries for different age groups from a CSV file using Python, JavaScript, and all developers data', 'Customizing the plot with labels, title, and legend', 'Using seaborn style for improved visuals in the plots', 'Loading data from a CSV file using pandas read CSV method and creating a plot with matplotlib', 'Exploring stateful plotting and the use of PLT object for plot manipulation', 'Mentioning the familiarity of the code for those following the series']}, {'end': 494.083, 'segs': [{'end': 289.544, 'src': 'embed', 'start': 261.866, 'weight': 2, 'content': [{'end': 264.848, 'text': "and what axes we're currently working with and things like that.", 'start': 261.866, 'duration': 2.982}, {'end': 273.774, 'text': "Now, we haven't talked much about figures and axes so far in the series because we've been working with a single figure and a single axes object.", 'start': 265.328, 'duration': 8.446}, {'end': 280.158, 'text': 'So what are the figure and axes? Well, the figure is the container holding our plots.', 'start': 274.194, 'duration': 5.964}, {'end': 286.682, 'text': 'So you can think of that as that whole window that shows us when we run our code.', 'start': 280.738, 'duration': 5.944}, {'end': 289.544, 'text': 'And the axes are the actual plots.', 'start': 287.202, 'duration': 2.342}], 'summary': 'The figure is the container holding plots, and the axes are the actual plots.', 'duration': 27.678, 'max_score': 261.866, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU261866.jpg'}, {'end': 328.937, 'src': 'embed', 'start': 303.972, 'weight': 1, 'content': [{'end': 318.632, 'text': 'There have been a few times in this series where we have used these methods of plt.gcf to get the current figure and we have also used gca for get current axes.', 'start': 303.972, 'duration': 14.66}, {'end': 326.276, 'text': 'like I said, those will get the current figure and axes for your plot and you can switch between different ones.', 'start': 319.873, 'duration': 6.403}, {'end': 328.937, 'text': "so that's the stateful way of doing it.", 'start': 326.276, 'duration': 2.661}], 'summary': 'Using plt.gcf and gca to switch between current figure and axes.', 'duration': 24.965, 'max_score': 303.972, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU303972.jpg'}, {'end': 401.382, 'src': 'heatmap', 'start': 354.648, 'weight': 0, 'content': [{'end': 358.63, 'text': "So to do this, I'm going to get rid of those examples there.", 'start': 354.648, 'duration': 3.982}, {'end': 362.171, 'text': 'Down here below my data.', 'start': 359.33, 'duration': 2.841}, {'end': 372.798, 'text': "I'm simply going to say fig ax for axes is equal to plt dot subplots and that is a method.", 'start': 362.171, 'duration': 10.627}, {'end': 381.906, 'text': 'now our axes here, which you can just think of as plots, is only set to a single axi at the moment or a single plot.', 'start': 372.798, 'duration': 9.108}, {'end': 391.074, 'text': "that's because by default subplots create a figure and then specify a certain number of rows and columns of axes.", 'start': 381.906, 'duration': 9.168}, {'end': 397.399, 'text': "If we don't pass in our number of rows and columns, then it just defaults to a one by one.", 'start': 391.494, 'duration': 5.905}, {'end': 401.382, 'text': 'So one row and one column, which is simply one axis.', 'start': 397.599, 'duration': 3.783}], 'summary': 'Using plt.subplots method to create a single plot.', 'duration': 27.258, 'max_score': 354.648, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU354648.jpg'}, {'end': 440.625, 'src': 'heatmap', 'start': 409.228, 'weight': 0.76, 'content': [{'end': 416.314, 'text': 'For some cases, this is as simple as just using your axis here instead of the pie plot object.', 'start': 409.228, 'duration': 7.086}, {'end': 425.879, 'text': 'So for example, all of the places where we said plt.plot, we can just replace those with ax.plot.', 'start': 416.654, 'duration': 9.225}, {'end': 432.142, 'text': 'And where we have plt.legend, we can simply change that to use ax2.', 'start': 426.879, 'duration': 5.263}, {'end': 434.743, 'text': "So I'll say ax.legend.", 'start': 432.242, 'duration': 2.501}, {'end': 440.625, 'text': 'Now when it comes to the titles and the x and y labels, these are a bit different.', 'start': 435.223, 'duration': 5.402}], 'summary': 'Replace plt.plot with ax.plot and plt.legend with ax.legend in the code.', 'duration': 31.397, 'max_score': 409.228, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU409228.jpg'}], 'start': 261.866, 'title': 'Object-oriented plotting in matplotlib', 'summary': 'Explores working with figures and axes in matplotlib, highlighting the importance of understanding these concepts for effective data visualization. it also discusses the use of plt.subplots method for object-oriented plotting, demonstrating the creation of multiple figures and axes and the preferred object-oriented approach in matplotlib.', 'chapters': [{'end': 303.412, 'start': 261.866, 'title': 'Working with figures and axes', 'summary': 'Discusses the concept of figures and axes in matplotlib, exploring their relationship and how a figure can hold multiple plots, while emphasizing the importance of understanding these concepts for effective data visualization.', 'duration': 41.546, 'highlights': ['The figure is the container holding our plots, and it represents the whole window that shows the output when the code is executed.', 'The axes are the actual plots, and a figure can have multiple plots, with the tutorial focusing on working with a single plot within a single figure.']}, {'end': 494.083, 'start': 303.972, 'title': 'Using subplots method for object-oriented plotting', 'summary': 'Discusses the use of plt.subplots method to create multiple figures and axes for object-oriented plotting, and demonstrates how to use ax.plot, ax.legend, and ax.set_title for a more preferred object-oriented approach in matplotlib.', 'duration': 190.111, 'highlights': ['plt.subplots method creates a figure and specifies a certain number of rows and columns of axes, defaulting to a one by one if no rows and columns are specified. plt.subplots method defaults to a one by one arrangement if no rows and columns are specified, creating a single axis.', 'Replacing plt.plot with ax.plot and plt.legend with ax.legend allows for plotting on the created axis. Using ax.plot and ax.legend instead of plt.plot and plt.legend enables plotting on the created axis for object-oriented plotting.', 'Instead of using plt.title, xlabel, and ylabel, object-oriented plotting utilizes set_title, set_xlabel, and set_ylabel methods. In object-oriented plotting, plt.title, xlabel, and ylabel are replaced by set_title, set_xlabel, and set_ylabel methods for defining titles and labels.']}], 'duration': 232.217, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU261866.jpg', 'highlights': ['The figure is the container holding our plots, representing the whole window.', 'plt.subplots method creates a figure and specifies a certain number of rows and columns of axes.', 'Replacing plt.plot with ax.plot and plt.legend with ax.legend allows for plotting on the created axis.', 'Instead of using plt.title, xlabel, and ylabel, object-oriented plotting utilizes set_title, set_xlabel, and set_ylabel methods.']}, {'end': 766.532, 'segs': [{'end': 541.658, 'src': 'embed', 'start': 515.015, 'weight': 3, 'content': [{'end': 524.623, 'text': "So let's say that we wanted the Python and JavaScript plots together on one plot, but then we wanted this all developers plot to be on its own.", 'start': 515.015, 'duration': 9.608}, {'end': 528.826, 'text': 'Well, to do this, we can just add more axes and do it that way.', 'start': 525.103, 'duration': 3.723}, {'end': 535.452, 'text': 'So the first argument to the subplots method is the number of rows and the number of columns.', 'start': 529.267, 'duration': 6.185}, {'end': 541.658, 'text': "By default, it's one by one, so that's why we get one axis.", 'start': 536.433, 'duration': 5.225}], 'summary': 'Use multiple axes to plot python and javascript together and all developers separately.', 'duration': 26.643, 'max_score': 515.015, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU515015.jpg'}, {'end': 672.101, 'src': 'embed', 'start': 649.369, 'weight': 0, 'content': [{'end': 660.475, 'text': "but let's keep it simple here and let's go back to two rows and one column, which is just the list of two axes subplots here.", 'start': 649.369, 'duration': 11.106}, {'end': 667.079, 'text': 'okay, so that gives us our two axes, which is what we wanted in order to break our data up onto two plots.', 'start': 660.475, 'duration': 6.604}, {'end': 672.101, 'text': 'now these two plots will still be on the same figure, which is the overall window.', 'start': 667.079, 'duration': 5.022}], 'summary': 'Using two rows and one column, two axes subplots are created to break the data onto two plots on the same figure.', 'duration': 22.732, 'max_score': 649.369, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU649369.jpg'}, {'end': 745.461, 'src': 'embed', 'start': 716.89, 'weight': 5, 'content': [{'end': 722.352, 'text': "So I'll leave a link to that video in the description section below if anyone is interested in learning more about that.", 'start': 716.89, 'duration': 5.462}, {'end': 729.655, 'text': "Okay, so now let's uncomment out our other code here and plot this data on our different axes.", 'start': 722.832, 'duration': 6.823}, {'end': 736.277, 'text': "So I'm going to uncomment out our data and uncomment out where we plotted these out.", 'start': 729.935, 'duration': 6.342}, {'end': 740.058, 'text': "Now I'm going to remove these print statements here.", 'start': 736.637, 'duration': 3.421}, {'end': 745.461, 'text': "And I think I'm going to want the all developers plot to be on top.", 'start': 740.838, 'duration': 4.623}], 'summary': 'Uncommented code, plotted data on different axes, and adjusted plot layout.', 'duration': 28.571, 'max_score': 716.89, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU716890.jpg'}], 'start': 494.083, 'title': 'Using and understanding multiple axes subplots in matplotlib', 'summary': 'Demonstrates using the subplots method in matplotlib to create multiple plots with flexibility, and explains different configurations of axes subplots with examples of 2 rows 1 column, 2 rows 2 columns, and total number of axes subplots in each configuration. it also covers python subplot unpacking with examples and references to additional resources.', 'chapters': [{'end': 594.709, 'start': 494.083, 'title': 'Using multiple axes in matplotlib', 'summary': 'Demonstrates how to use the subplots method in matplotlib to create multiple plots by specifying the number of rows and columns, providing more flexibility in visualizing data.', 'duration': 100.626, 'highlights': ['The subplots method in Matplotlib allows for the creation of multiple plots by specifying the number of rows and columns, offering flexibility in data visualization.', 'By default, the subplots method creates a one by one layout, but it can be adjusted to different configurations such as two rows and one column, providing options for organizing the plots.', 'The ability to customize the layout of plots using the subplots method enhances the visualization of data, enabling the combination of specific data on a single plot while segregating other data onto separate plots.']}, {'end': 672.101, 'start': 594.709, 'title': 'Understanding axes subplots in matplotlib', 'summary': 'Explains how to create different configurations of axes subplots in matplotlib, with examples of 2 rows 1 column, 2 rows 2 columns, and the resulting nested list structures, demonstrating the total number of axes subplots in each configuration.', 'duration': 77.392, 'highlights': ['The chapter explains how to create different configurations of axes subplots in Matplotlib, with examples of 2 rows 1 column, 2 rows 2 columns, and the resulting nested list structures, demonstrating the total number of axes subplots in each configuration.', 'The example of 2 rows and 2 columns demonstrates the nested list structure, with an outer list containing two values, each being a list of two axes subplots, resulting in a total of four axes subplots.', 'Demonstrates the simple configuration of 2 rows and 1 column, resulting in a list of two axes subplots, representing two plots on the same figure.']}, {'end': 766.532, 'start': 672.101, 'title': 'Python subplot unpacking', 'summary': 'Explains how to unpack subplots in python to visualize data on different axes, showcasing the process of unpacking a list of two values and printing them individually, with a reference to a python quick tips video for more examples on unpacking.', 'duration': 94.431, 'highlights': ['The chapter demonstrates the process of unpacking subplots in Python, allowing visualization of data on different axes.', 'The unpacking process involves returning a list of two values and printing them individually, showcasing the unpacking functionality in Python.', 'A reference to a Python Quick Tips video is provided for further examples and explanation on unpacking in Python.']}], 'duration': 272.449, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU494083.jpg', 'highlights': ['The subplots method in Matplotlib allows for the creation of multiple plots by specifying the number of rows and columns, offering flexibility in data visualization.', 'The chapter explains how to create different configurations of axes subplots in Matplotlib, with examples of 2 rows 1 column, 2 rows 2 columns, and the resulting nested list structures, demonstrating the total number of axes subplots in each configuration.', 'The ability to customize the layout of plots using the subplots method enhances the visualization of data, enabling the combination of specific data on a single plot while segregating other data onto separate plots.', 'The example of 2 rows and 2 columns demonstrates the nested list structure, with an outer list containing two values, each being a list of two axes subplots, resulting in a total of four axes subplots.', 'The chapter demonstrates the process of unpacking subplots in Python, allowing visualization of data on different axes.', 'A reference to a Python Quick Tips video is provided for further examples and explanation on unpacking in Python.']}, {'end': 1163.263, 'segs': [{'end': 792.746, 'src': 'embed', 'start': 766.952, 'weight': 2, 'content': [{'end': 772.715, 'text': 'and now we can do different legends and titles and x and y labels for these as well.', 'start': 766.952, 'duration': 5.763}, {'end': 777.118, 'text': 'so I can copy this and paste it down here.', 'start': 772.715, 'duration': 4.403}, {'end': 778.178, 'text': 'so now I can do.', 'start': 777.118, 'duration': 1.06}, {'end': 781.58, 'text': 'let me exit that output so that we can see here.', 'start': 778.178, 'duration': 3.402}, {'end': 789.504, 'text': "so I'll do ax1 for all of these here and I will do ax2 for all of these here.", 'start': 781.58, 'duration': 7.924}, {'end': 792.746, 'text': 'okay, so now we have all of those changed.', 'start': 789.504, 'duration': 3.242}], 'summary': 'Creating legends, titles, and labels for multiple plots using ax1 and ax2.', 'duration': 25.794, 'max_score': 766.952, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU766952.jpg'}, {'end': 919.736, 'src': 'heatmap', 'start': 894.678, 'weight': 0.756, 'content': [{'end': 901.705, 'text': 'so share x will only label the bottom ticks for two rows and share y will only label the left.', 'start': 894.678, 'duration': 7.027}, {'end': 903.727, 'text': 'most ticks for two columns.', 'start': 901.705, 'duration': 2.022}, {'end': 913.973, 'text': 'so if we run this, then we can see that now we were, we did have these x tick marks here on this plot as well.', 'start': 903.727, 'duration': 10.246}, {'end': 919.736, 'text': "but since we're sharing this x now, we can see that we only have these listed on the bottom.", 'start': 913.973, 'duration': 5.763}], 'summary': 'Sharing x labels for two rows and y labels for two columns.', 'duration': 25.058, 'max_score': 894.678, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU894678.jpg'}, {'end': 1006.692, 'src': 'heatmap', 'start': 970.375, 'weight': 0.814, 'content': [{'end': 974.539, 'text': 'So I want this to be fig two and I want this to be axis two.', 'start': 970.375, 'duration': 4.164}, {'end': 979.184, 'text': 'And now we already had those axis ones plotted down here.', 'start': 975.02, 'duration': 4.164}, {'end': 981.427, 'text': "So we don't have to change anything there.", 'start': 979.545, 'duration': 1.882}, {'end': 988.108, 'text': 'we could add that title back in and that X label back in for AX1 and AX2 down here.', 'start': 982.087, 'duration': 6.021}, {'end': 996.95, 'text': "but just to see what this looks like, let's go ahead and run this and we can see that now we get two figures here.", 'start': 988.108, 'duration': 8.842}, {'end': 998.23, 'text': 'so with those small changes,', 'start': 996.95, 'duration': 1.28}, {'end': 1006.692, 'text': 'we were actually able to create two different figures here and we can interact with these just like we would any other figures.', 'start': 998.23, 'duration': 8.462}], 'summary': 'Two figures created with small changes, allowing interaction.', 'duration': 36.317, 'max_score': 970.375, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU970375.jpg'}, {'end': 1113.252, 'src': 'embed', 'start': 1084.565, 'weight': 0, 'content': [{'end': 1089.329, 'text': "but before we end, i'd like to mention the sponsor of this video, and that is brilliant.org.", 'start': 1084.565, 'duration': 4.764}, {'end': 1094.694, 'text': "So in this series we've been learning about Matplotlib and how to plot data in Python,", 'start': 1090.51, 'duration': 4.184}, {'end': 1099.118, 'text': 'and Brilliant would be an excellent way to supplement what you learn here with their hands-on courses.', 'start': 1094.694, 'duration': 4.424}, {'end': 1102.861, 'text': 'They have some excellent courses covering the fundamentals of statistics,', 'start': 1099.438, 'duration': 3.423}, {'end': 1107.005, 'text': 'and these lessons do a deep dive on how to think about and analyze data correctly.', 'start': 1102.861, 'duration': 4.144}, {'end': 1113.252, 'text': 'They even use Python in their statistics courses and will quiz you on how to correctly analyze the data within the language.', 'start': 1107.385, 'duration': 5.867}], 'summary': 'Brilliant.org offers hands-on courses supplementing data analysis, including python-based statistics lessons.', 'duration': 28.687, 'max_score': 1084.565, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU1084565.jpg'}], 'start': 766.952, 'title': 'Plotting multiple figures with matplotlib', 'summary': 'Demonstrates creating two figures with different plots, using sharex and sharey to control axis ticks, and saving the figures as images, while also mentioning brilliant.org as a learning resource.', 'chapters': [{'end': 1163.263, 'start': 766.952, 'title': 'Matplotlib: plotting multiple figures', 'summary': 'Demonstrates how to plot multiple figures using matplotlib, including creating two figures with different plots, using sharex and sharey to control the axis ticks, and saving the figures as images, along with a mention of brilliant.org as a learning resource.', 'duration': 396.311, 'highlights': ['The chapter demonstrates how to create two figures with different plots by changing the subplots method parameters, resulting in the generation of two distinct figures for visualization.', 'The usage of sharex and sharey arguments in the subplots method allows for controlling the axis ticks, providing a cleaner and more organized visualization.', 'The example showcases the process of saving the generated figures as images using the savefig method, enabling the automation of data analysis by saving plots to the file system.']}], 'duration': 396.311, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU766952.jpg', 'highlights': ['The usage of sharex and sharey arguments in the subplots method allows for controlling the axis ticks, providing a cleaner and more organized visualization.', 'The chapter demonstrates how to create two figures with different plots by changing the subplots method parameters, resulting in the generation of two distinct figures for visualization.', 'The example showcases the process of saving the generated figures as images using the savefig method, enabling the automation of data analysis by saving plots to the file system.']}, {'end': 1269.046, 'segs': [{'end': 1218.951, 'src': 'embed', 'start': 1182.941, 'weight': 0, 'content': [{'end': 1187.585, 'text': 'Pandas actually uses Matplotlib for plotting out information itself.', 'start': 1182.941, 'duration': 4.644}, {'end': 1193.75, 'text': "so knowing Matplotlib will be a great thing to know for anyone who thinks they're interested in watching the Pandas series.", 'start': 1187.585, 'duration': 6.165}, {'end': 1195.552, 'text': "when I finish that and it's released.", 'start': 1193.75, 'duration': 1.802}, {'end': 1199.475, 'text': 'But if anyone would like to see me add to this Matplotlib series,', 'start': 1195.852, 'duration': 3.623}, {'end': 1204.059, 'text': "then please let me know if there's anything you are wanting to learn that I didn't cover in this series,", 'start': 1199.475, 'duration': 4.584}, {'end': 1206.682, 'text': "or if there's anything that I just forgot and didn't cover.", 'start': 1204.059, 'duration': 2.623}, {'end': 1212.066, 'text': 'And if I get enough requests, then I can always continue adding to this series in the future.', 'start': 1207.202, 'duration': 4.864}, {'end': 1218.951, 'text': "And I'm also going to try to do a video in the near future showing exactly how I downloaded and parsed out a lot of this data.", 'start': 1212.526, 'duration': 6.425}], 'summary': 'Pandas uses matplotlib for plotting; requests for adding to matplotlib series may lead to future updates.', 'duration': 36.01, 'max_score': 1182.941, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU1182941.jpg'}, {'end': 1269.046, 'src': 'embed', 'start': 1254.672, 'weight': 4, 'content': [{'end': 1257.453, 'text': 'the easiest way is to simply like the video and give it a thumbs up,', 'start': 1254.672, 'duration': 2.781}, {'end': 1262.035, 'text': "and also it's a huge help to share these videos with anyone who you think would find them useful, and if you have the means,", 'start': 1257.453, 'duration': 4.582}, {'end': 1265.94, 'text': "you can contribute through patreon, and there's a link to that page in the description section below.", 'start': 1262.035, 'duration': 3.905}, {'end': 1269.046, 'text': 'Be sure to subscribe for future videos, and thank you all for watching.', 'start': 1266.361, 'duration': 2.685}], 'summary': 'Encourage likes, shares, and patreon contributions to support the channel.', 'duration': 14.374, 'max_score': 1254.672, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU1254672.jpg'}], 'start': 1163.623, 'title': 'Matplotlib basics and future plans', 'summary': 'Covers the basics of creating plots using matplotlib and hints at future series on the pandas library and the release of the 2019 stack overflow developer survey data parsing video.', 'chapters': [{'end': 1269.046, 'start': 1163.623, 'title': 'Matplotlib basics and future plans', 'summary': 'Covers the basics of creating plots using matplotlib and hints at future series on the pandas library for in-depth data analysis and the release of the 2019 stack overflow developer survey data parsing video.', 'duration': 105.423, 'highlights': ['Matplotlib basics covered for creating plots and customizing them in different ways.', 'Pandas series on in-depth data analysis and its use of Matplotlib for plotting mentioned for future release.', 'Plans to add more content to the Matplotlib series based on viewer requests and interest.', 'Intention to create a video showing the process of downloading and parsing the 2019 Stack Overflow Developer Survey data for real-world data analysis and plotting.', 'Encouragement for viewer engagement through questions, likes, shares, and Patreon support, and a call to subscribe for future content.']}], 'duration': 105.423, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XFZRVnP-MTU/pics/XFZRVnP-MTU1163623.jpg', 'highlights': ['Plans to add more content to the Matplotlib series based on viewer requests and interest.', 'Pandas series on in-depth data analysis and its use of Matplotlib for plotting mentioned for future release.', 'Intention to create a video showing the process of downloading and parsing the 2019 Stack Overflow Developer Survey data for real-world data analysis and plotting.', 'Matplotlib basics covered for creating plots and customizing them in different ways.', 'Encouragement for viewer engagement through questions, likes, shares, and Patreon support, and a call to subscribe for future content.']}], 'highlights': ['Creating plots with the subplots method allows for working with plots in a more object-oriented manner and is preferred by many, even for creating a single plot.', 'The video focuses on creating plots using the subplots method and modifying earlier plots to use subplots.', 'The series is sponsored by Brilliant.org, and viewers are encouraged to check out their services via the link in the description.', 'Plotting median salaries for different age groups from a CSV file using Python, JavaScript, and all developers data', 'Customizing the plot with labels, title, and legend', 'Using seaborn style for improved visuals in the plots', 'Loading data from a CSV file using pandas read CSV method and creating a plot with matplotlib', 'Exploring stateful plotting and the use of PLT object for plot manipulation', 'Mentioning the familiarity of the code for those following the series', 'The figure is the container holding our plots, representing the whole window.', 'plt.subplots method creates a figure and specifies a certain number of rows and columns of axes.', 'Replacing plt.plot with ax.plot and plt.legend with ax.legend allows for plotting on the created axis.', 'Instead of using plt.title, xlabel, and ylabel, object-oriented plotting utilizes set_title, set_xlabel, and set_ylabel methods.', 'The subplots method in Matplotlib allows for the creation of multiple plots by specifying the number of rows and columns, offering flexibility in data visualization.', 'The chapter explains how to create different configurations of axes subplots in Matplotlib, with examples of 2 rows 1 column, 2 rows 2 columns, and the resulting nested list structures, demonstrating the total number of axes subplots in each configuration.', 'The ability to customize the layout of plots using the subplots method enhances the visualization of data, enabling the combination of specific data on a single plot while segregating other data onto separate plots.', 'The example of 2 rows and 2 columns demonstrates the nested list structure, with an outer list containing two values, each being a list of two axes subplots, resulting in a total of four axes subplots.', 'The chapter demonstrates the process of unpacking subplots in Python, allowing visualization of data on different axes.', 'A reference to a Python Quick Tips video is provided for further examples and explanation on unpacking in Python.', 'The usage of sharex and sharey arguments in the subplots method allows for controlling the axis ticks, providing a cleaner and more organized visualization.', 'The chapter demonstrates how to create two figures with different plots by changing the subplots method parameters, resulting in the generation of two distinct figures for visualization.', 'The example showcases the process of saving the generated figures as images using the savefig method, enabling the automation of data analysis by saving plots to the file system.', 'Plans to add more content to the Matplotlib series based on viewer requests and interest.', 'Pandas series on in-depth data analysis and its use of Matplotlib for plotting mentioned for future release.', 'Intention to create a video showing the process of downloading and parsing the 2019 Stack Overflow Developer Survey data for real-world data analysis and plotting.', 'Matplotlib basics covered for creating plots and customizing them in different ways.', 'Encouragement for viewer engagement through questions, likes, shares, and Patreon support, and a call to subscribe for future content.']}