Introduction
Know your problem
Know your data
Visualize your data – numerical variables
Work with your chart
18. Describe your chart: title and source
Check yourself

Instruction

Always add a title and the source of your data to your chart!

Every reader – familiar with the data or not – should be able to understand what is presented on your chart. A good title will help tremendously. It should clearly show what the chart is about, but it doesn't have to be boring.

In some cases, a clever or catchy title is a good choice. You can use a subtitle to precisely explain the contents of your chart. In this situation, the role of the title is performed by the subtitle.

You can also reverse this: a matter-of-fact title with a catchy subtitle.

Whether you choose a clever or a more traditional title and subtitle will depend on your audience and the purpose of your chart. In all events, though, you want the data on your chart to be taken seriously. Displaying the source of your data makes your chart more credible.

To add this information on the scatter plot, use this command:

+labs(title="your_title", subtitle="your-subtitle", caption="your source")

Obviously, you'll enter your own title, subtitle, and source info.

Exercise

Add a title, a subtitle, and a source to your chart. Use the "labs" command as explained above.

An example title might be "Does Wealthy Equal Drunk?". An example subtitle might be formulated as: "The relationship between a country's wealth and its alcohol consumption". You can use our suggestions or prepare your own title. One thing cannot be changed - the source must be "Source: WHO and World Bank, 2010".

Stuck? Here's a hint!

You should write:

labs(
  title = "Does Wealthy Equal Drunk?", 
  subtitle = "The relationship between a country's wealth and its alcohol consumption", 
  caption = "Source: WHO and World Bank, 2010")