From the course: Data Visualization with Python in Excel
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Solution: Customize your first plot
From the course: Data Visualization with Python in Excel
Solution: Customize your first plot
(upbeat music) - [Instructor] Fantastic job taking those initial steps to code Python charts in Excel on your own. Now, let me show you how I approach it. Go ahead and open up first-plot-challenge, and let's get started. First, I'll load the data into Python in Excel, and name it rainfall_df. With the code rainfall_df equals xl, rainfall All, headers equals true. Next, we'll build a line chart using the plt.plot function, placing the month on the x axis and rainfall on the y axis. Let's add a title, Monthly Rainfall, with the code, plt.title Monthly Rainfall. If I had mentioned the unit of measurement, it would be great to include it on the plot. Well done if you wondered about that lack of detail as you were building this. Now let's execute the code with Ctrl + Enter, and we'll switch to view the Excel values with Ctrl + Alt + Shift + M. Here's our plot. Let's create a reference to get a bigger image. The most noticeable issue with our result is probably how the labels are…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.