theme_marjan | R Documentation |
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.
theme_marjan(legend.position = "top")
legend.position |
Character specifying the position of the legend on the plot.
The options are |
A ggplot2 theme.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.