1. 学习
  2. /
  3. 课程
  4. /
  5. Introduction to Data Visualization with ggplot2

Connected

练习

Setting themes

Reusing a theme across many plots helps to provide a consistent style. You have several options for this.

  1. Assign the theme to a variable, and add it to each plot.
  2. Set your theme as the default using theme_set().

A good strategy that you'll use here is to begin with a built-in theme then modify it.

plt_prop_unemployed_over_time is available. The theme you made earlier is shown in the sample code.

说明 1 / 共 2 个

undefined XP
    1
    2
  • Assign the theme to theme_recession.
  • Add the Tufte theme and theme_recession together.
  • Use the Tufte recession theme by adding it to the plot.