From the course: Data Visualization with Matplotlib and Seaborn

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: Plotting DataFrames

Solution: Plotting DataFrames

- [Instructor] Okay, welcome back, everybody. As I mentioned before, there are a couple ways to plot with data frames. You might have chosen to plot each series individually, or you might have just chosen to pass the entire data frame into the plot function. For this case, either method would work, both methods are acceptable. Again, as we start customizing our charts, you know, we'll start to lean towards this top method where we really plot each series individually. But if you plotted the data frame, hey, that saved you some time. Let's go ahead and walk through our solutions. Okay, so let's go ahead and create our figure and axis objects. So this will equal plot.subplots. And then the first method for solving this would just be to use plot on our axis object and pass in our monthly revenue data frame. And we will end up with two charts here. And again, our x axis is very ugly. We'll learn how to format our charts, and make this a little bit better. But if you got a chart that looks…

Contents