Description Usage Arguments Source Examples
View source: R/cp_sequoiaTheme.R
The cp_sequoiaTheme
is built on top of the ggthemes
package. It makes specific design changes to the theme_fivethirtyeight
so
that the theme blends in seemlessly with the Alt slides in my Sequoia template
for Apple's Keynote. Among the changes completed are matching backgrounds, an
altered legend position and direction, a much larger default font size.
1 2 | cp_sequoiaTheme(base_size = 28, base_family = "sans",
background = c("transparent", "white", "gray"), legend_size = 1.5, map = FALSE)
|
base_size |
Base font size |
base_family |
Base font family |
background |
A choice of either transparent, white, or gray (gray available for plots only) |
legend_size |
Size of the legend items (in centimeters) |
map |
A logical scalar. Is the plot a map? |
ggthemes
package (source code released under GPL-2 license)
1 2 3 4 5 6 7 8 9 10 11 | library("ggplot2")
p1 <- ggplot(data = mpg) +
geom_point(mapping = aes(x = hwy, y = displ, color = as.factor(cyl))) +
cp_sequoiaTheme(background = "white", map = FALSE)
p2 <- ggplot(data = mpg) +
geom_point(mapping = aes(x = hwy, y = displ, color = as.factor(cyl)),
size = 4, position = "jitter") +
scale_x_continuous(limits = c(10, 50)) +
cp_sequoiaTheme(background = "white", map = FALSE) +
labs(color = "Cylinder", x = "Highway Fuel Efficency", y = "Engine Displacement")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.