Description Usage Arguments Examples
View source: R/ggplot_themes.R
A theme based on ggplot theme_minimal. Uses default R colors for plot background
1 2 3 4 5 | theme_darklightmix(
font_size = 10,
legend_position = "right",
color_theme = "light"
)
|
font_size |
Base font size |
legend_position |
the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector) |
color_theme |
Choose from a combination of light and dark themes ("va_light","va_dark","light","lightcyan","cornsilk","antiquewhite","darkslategray","gray25","turquoise4","steelblue") |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | for(i in c("va_light","va_dark"
,"light","lightcyan","cornsilk","antiquewhite"
,"darkslategray","gray25","turquoise4","steelblue")){
print(
iris %>%
ggplot(aes(x=Sepal.Length,y=Sepal.Width,color=factor(paste("Petal",round(Petal.Length,0))))) +
geom_point() +
labs(x="Sepal Length", y="Sepal Width",
title="Petals and Sepals",ro
subtitle="Plot shows the sizes of petals and sepals",
caption=i,
color = "Legend") +
facet_wrap(~Species,scales = "free") +
theme_darklightmix(color_theme = i) +
scale_color_brewer(type="qual",palette = "Set3") )
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.