Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to Data Visualization with Matplotlib!
You have completed Introduction to Data Visualization with Matplotlib!
Preview
The chart... the myth... the Legend. Without adding legends and labels to a chart, the data can appear mythical. Let's see how easy it is to add these in matplotlib.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
This is where legends can come in handy.
0:00
Fortunately, matplotlib makes
this easy to implement as well.
0:00
We add labels to our data series and
0:05
call the legend method on the plot
object before we show it.
0:07
So our label,
we'll just call this dash-dot,
0:14
And dashed, and then call
a legend method and run our cell.
0:22
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up