Spring Deals - hours only!Up to 70% off on all courses and bundles.-Close
Introduction
Know your problem
Know your data
Visualize your data - pie charts
Work with your chart
18. Describe your chart with a title
Check yourself

Instruction

Always remember to add a descriptive title to your chart.

To be sure that anyone, whether they know the data or not, can understand what is presented in your chart, you must give it a title. Try to describe your chart in a few simple words. If your audience would appreciate some humor, you can choose a funny or clever title. Every organization has its own policy for what's acceptable. Whatever you choose, the purpose of the chart should be clear from the title.

For pie charts – and indeed for all charts – titles are usually placed in the top left corner. Depending on how you will use your chart, you may want to include information about the measures and variables used.

Exercise

Add a title to the chart. Use the labs command with the title argument. Remember to enclose the title name in quotes, like this "Title Name". You can make up your own title or borrow ours: "Total alcohol consumption in France by beverage type".

When you're done, press the Run and Check Code button.

Stuck? Here's a hint!

You should write:

labs(title = "Total alcohol consumption in France by beverage type")