Skip to content

Commit

Permalink
shortened plot title in barplot
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorcampbell committed Nov 11, 2023
1 parent e564139 commit fc78bb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/viz.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ and add a title to the chart. Plot titles are not always required, especially wh
it would be redundant with an already-existing
caption or surrounding context (e.g., in a slide presentation with annotations).
But if you decide to include one, a good plot title should provide the take home message
that you want readers to focus on, e.g., "The Earth's seven largest landmasses are all continents,"
that you want readers to focus on, e.g., "Earth's seven largest landmasses are all continents,"
or a more general summary of the information displayed, e.g., "The twelve largest landmasses on Earth."

To make these final adjustments we will use the `labs` function rather than the `xlab` and `ylab` functions
Expand All @@ -991,7 +991,7 @@ islands_bar <- ggplot(islands_top12,
labs(x = "Size (1000 square mi)",
y = "Landmass",
fill = "Type",
title = "The Earth's seven largest landmasses are all continents") +
title = "Earth's seven largest landmasses are all continents") +
theme(text = element_text(size = 10))
islands_bar
Expand Down

0 comments on commit fc78bb6

Please sign in to comment.