Learn R Programming

SciencesPo (version 1.3.9)

theme_pub: The Default Theme

Description

After loading the SciencesPo package, this theme will be set to default for all subsequent graphs made with ggplot2.

Usage

theme_pub(legend = "bottom", font_family = "sans", font_size = 13,
  line_width = 0.5, axis.line.x = element_line(),
  axis.line.y = element_blank())

Arguments

legend
Enables to set legend position, default is "bottom".
font_family
Default font family.
font_size
Overall font size. Default is 14.
line_width
Default line size.
axis.line.x
Enables to set x axis line.
axis.line.y
Enables to set y axis line.

Value

  • The theme.

encoding

UTF-8

See Also

theme, theme_538, theme_blank.

Examples

Run this code
ggplot(diamonds,aes(cut, group=1)) + geom_bar()+
geom_freqpoly(stat="count",size=2) + scale_color_pub() + theme_pub(line_width=1)

dat <- data.frame()
for(i in 1:4)
dat <- rbind(dat, data.frame(set=i, x=anscombe[,i], y=anscombe[,i+4]))

ggplot(dat, aes(x, y)) + geom_point(size=5, color="red",
fill="orange", shape=21) + geom_smooth(method="lm", fill=NA,
fullrange=TRUE) + facet_wrap(~set, ncol=2)

Run the code above in your browser using DataLab