Installing the ggthemr Package in R

To use this package, we need to install it using:

R




install.packages("ggthemr")
library(ggthemr)


Output:

ggthemr Package in R

On some versions of R there might be a warning like this.

If you also see the same warning, you need to install the different version of the package using.

R




install.packages("remotes")
library(remotes)
 
# Installing from GitHub
install_github("cttobin/ggthemr")
 
# Loading the package
library(ggthemr)


Output:

ggthemr Package in R

The ‘remotes’ package is used to fetch packages from various sources like GitHub.

  • Now you might see this.
  • Just press the Enter key to skip the updates and load the package.

Change Color Scheme of ggplot2 Plot Using ggthemr Package in R

The open-source tool ggplot2 in R is used for statistical data visualization. To make the plots made by ggplot2 more appealing and to apply colors, different designs, and styling ggthemr Package in R is a great help.

ggthemr Package in R Programming Language is developed by Ciarán Tobin and maintained by Mikata Project.

The idea behind this package is to set the theme once so that there’s no need to update the styling again and again.

The theme has several parts:

  • Spacing around the plot and between elements
  • The color palette for the background, axes, gridlines, text, etc.
  • Text size
  • Layout of axes lines and gridlines

Similar Reads

Installing the ggthemr Package in R

To use this package, we need to install it using:...

Using ggthemr Package in R with ‘ggplot2’

...