Changing Themes (Look and Feel) in ggplot2 in R

Premium

The themes layer is used to style all the non-data ink of the plot, i.e., all the visual elements that are not part of data.

When we create a chart using ggplot2, it automatically uses a default theme. For theming we have a few choices:

  1. Use the default theme (What we have seen so far). The default theme is called theme_grey().
  2. Use a built-in theme. There are two built-in themes 1) theme_grey() which is default and 2) theme_bw(), a theme with a white background.
  3. Modify/override specific elements of the default theme. This is done by using the theme() function. It overrides the graphical parameters of the default theme.
  4. Create your own theme

Unlock Premium Content

Upgrade your account to access the full article, downloads, and exercises.

You'll get access to:

  • Access complete tutorials and examples
  • Download source code and resources
  • Follow along with practical exercises
  • Get in-depth explanations

Course Downloads

eBook - Data Visualization with R

eBook for Data Visualization with R

PDF
Premium
Upgrade to Pro

Data and R Code

Data and R Code Files for Data Visualization with R

ZIP
Premium
Upgrade to Pro