theme_marjan: Marjan's ggplot2 theme

View source: R/theme_marjan.R

theme_marjanR Documentation

Marjan's ggplot2 theme

Description

This function creates a custom ggplot2 theme, with various formatting adjustments. It sets the panel grid minor and axis ticks to blank, modifies text elements (including strip text, legend, axis titles, plot title, subtitle, and caption). The function also allows to change the position of the legend.

Usage

theme_marjan(legend.position = "top")

Arguments

legend.position

Character specifying the position of the legend on the plot. The options are "top", "bottom", "left", "right", "none". Default is "top".

Value

A ggplot2 theme.

Examples

## Not run: 
library(ggplot2)
ggplot(mtcars, aes(x = mpg, y = disp, color = as.factor(am))) +
 geom_point() +
 labs(title = "Title",
      color  = "Legend title",
     subtitle = "Subtitle",
     caption = "Caption",
      y = "Y axis title",
      x = "X axis title") +
 theme_marjan(legend.position = "bottom")

## End(Not run)


handyReport documentation built on Oct. 8, 2024, 3 p.m.