dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
q <- (qplot(carat, price, data=dsamp, colour=clarity)
+ ggtitle("Diamonds Are Forever"))
## Standard
q + theme_economist() + scale_colour_economist()
## Stata colors
q + theme_economist(stata=TRUE) + scale_colour_economist(stata=TRUE)
## Darker plot region
q + theme_economist(dkpanel=TRUE) + scale_colour_economist(stata=TRUE)
## Darker plot region is best for for facets
dkblue <- ggthemes_data$economist$fg['blue_dark']
(ggplot(data=dsamp, aes(x=carat, y=price))
+ geom_point(colour=dkblue)
+ facet_grid(. ~ cut )
+ theme_economist(dkpanel=TRUE))
##' ## Change axis lines to vertical
(q + theme_economist(horizontal=FALSE)
+ scale_colour_economist() + coord_flip())
## White panel/light gray background
(q + theme_economist_white()
+ scale_colour_economist())
## All white variant
(q + theme_economist_white(gray_bg=FALSE)
+ scale_colour_economist())
## Not run:
##D ## The Economist uses ITC Officina Sans
##D library(extrafont)
##D (q + theme_economist(base_family="ITC Officina Sans")
##D + scale_colour_economist())
##D
##D ## Verdana is a widely available substitute
##D (q + theme_economist(base_family="Verdana")
##D + scale_colour_economist())
## End(Not run)