Default theme for the package: theme_ggstatsplot

ggstatsplot uses a default theme theme_ggstatsplot(), which is a selected ggplot2 theme with few aesthetic modifications overlaid on top, that can be used with any ggplot2 object.

Here is a simple example:

# for reproducibility

  # basic scatter plot with `theme_ggstatsplot()` added
  plotlist = list(
    ggplot(mtcars, aes(x = wt, y = mpg)) +
      geom_point() +
    # basic scatter plot without the default theme
    ggplot(mtcars, aes(x = wt, y = mpg)) +
  nrow = 1,
  annotation.args = list(title = "Plot with and without the default `theme_ggstatsplot` overlaid")

All plots in this package have theme_bw() by default as the base on which theme_ggstatsplot() is built, but this can be modified using the ggtheme argument. Let’s see an example with ggcorrmat function.

  data = iris,
  cor.vars = c(Sepal.Length:Petal.Width),
  ggtheme = ggthemes::theme_fivethirtyeight(), # selected ggplot2 theme
  ggstatsplot.layer = FALSE # turn of default theme layer

Try modifying the theme for other functions (use themes from ggplot2, ggthemes, hrbrthemes, etc.).


If you find any bugs or have any suggestions/remarks, please file an issue on GitHub: