Before our users ever seeing a plot of data, it is important for us to label things properly so users can easily make sense of them. In this video we'll look at how to add titles and custom labels to our plots.
- If we're going to deliver good insights…and present data that has a strong message…behind it to our users, we need to make sure…that we put on all the finishing touches…so they can read it without us having to explain it to them.…Here what I'm going to do is take a look…at doing things like adding titles and colors,…and using custom labels in ggplot.…I'm going to start just by importing our libraries.…From there, I'm going to do a real basic plot…using some data that comes in,…which is the miles per gallon data set,…and we're just have a simple scatter plot here…with the city versus highway miles,…you can see a dot represented for every point there.…
Now if you want to add a title,…beyond the typical way that we draw this,…I need to add a new function called a ggtitle.…And so here I'm going to call it city versus highway…miles per gallon.…And you can see that right here on my screen,…right above the plot.…Now if I wanted to add some custom labels…in addition to my title,…I can set the xlab for x label and the ylab for y label.…
Released
8/9/2017- Working with flat files, including Parquet
- Reading data using APIs or libraries
- Inspecting and aggregating data with Pandas
- Exporting data with Pandas
- Creating charts using ggplot
- Styling plots using ggplot
- Finishing data visualizations
Share this video
Embed this video
Video: Finish your plots