Change the appearance of titles
Besides applying defined theme presets, you can tweak your plot even more by altering different style attributes of it. Hint: You can reuse and overwrite the ilo_plot variable generated in the previous exercise – the current plot is already shown in the window on the right.
This exercise is part of the course
Communicating with Data in the Tidyverse
Exercise instructions
Using a custom
theme()function call andelement_text():- Change the font
familyof the text to"Bookman". - Additionally, change the
colorof the title and caption to"gray25"and"gray30", respectively. - Make the subtitle a little bigger by increasing the
sizeto 12.
- Change the font
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
ilo_plot <- ilo_plot +
theme_minimal() +
# Customize the "minimal" theme with another custom "theme" call
theme(
text = element_text(___ = ____),
title = element_text(___ = ____),
plot.caption = element_text(___ = ___),
plot.subtitle = element_text(___ = ____)
)
# Render the plot object
ilo_plot