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:

library(ggplot2)

ggstatsplot::combine_plots(
  # basic scatter plot with `theme_ggstatsplot()` added
  ggplot(mtcars, aes(x = wt, y = mpg)) +
    geom_point() +
    ggstatsplot::theme_ggstatsplot(),
  # basic scatter plot without the default theme
  ggplot(mtcars, aes(x = wt, y = mpg)) +
    geom_point(),
  nrow = 1,
  title.text = "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.

ggstatsplot::ggcorrmat(
  data = datasets::iris,
  cor.vars = c(Sepal.Length:Petal.Width),
  matrix.type = "upper",
  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.).

Suggestions

If you find any bugs or have any suggestions/remarks, please file an issue on GitHub: https://github.com/IndrajeetPatil/ggstatsplot/issues