Description Usage Arguments Value Author(s) See Also Examples
After loading the SciencesPo package, this theme will be set to default for all subsequent graphs made with ggplot2.
1 2 |
legend |
enables to set legend position, default is "bottom". |
base_size |
overall font size. Default is 14. |
base_family |
a name for default font family. |
horizontal |
logical. Horizontal axis lines? |
axis_line |
enables to set x and y axes. |
The theme.
Daniel Marcelino [aut, cre]
theme
, theme_538
, theme_blank
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Previewplot() + theme_pub()
# Anscombe data
dat <- data.frame()
for(i in 1:4)
dat <- rbind(dat, data.frame(set=i, x=anscombe[,i], y=anscombe[,i+4]))
gg <- ggplot(dat, aes(x, y))
gg <- gg + geom_point(size=5, color="red", fill="orange", shape=21)
gg <- gg + geom_smooth(method="lm", fill=NA, fullrange=TRUE)
gg <- gg + facet_wrap(~set, ncol=2)
gg <- gg + theme_pub(base_family=SciencesPoFont())
gg <- gg + theme(plot.background=element_rect(fill="#f7f7f7"))
gg <- gg + theme(panel.background=element_rect(fill="#f7f7f7"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.