Themes based on Stata graph schemes

dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
q1 <- (qplot(carat, price, data=dsamp, colour=clarity)
       + ggtitle("Diamonds"))
q2 <- (qplot(carat, price, data=dsamp)
       + facet_wrap(~ clarity)
       + ggtitle("Diamonds"))
q1mono <- (qplot(carat, price, shape=clarity, color=clarity,
           data=dsamp)
           + scale_shape_stata()
           + ggtitle("Diamonds"))
## s2color
(q1 + theme_stata() + scale_colour_stata(scheme = "s2color"))

plot of chunk theme_stata

(q2 + theme_stata())

plot of chunk theme_stata

## s2mono
(q1mono + theme_stata(scheme = "s2mono") + scale_colour_stata("mono"))

plot of chunk theme_stata

(q2 + theme_stata(scheme = "s2mono"))

plot of chunk theme_stata

## s1color
(q1 + theme_stata(scheme = "s1color") + scale_colour_stata("s1color"))

plot of chunk theme_stata

(q2 + theme_stata(scheme = "s1color"))

plot of chunk theme_stata

## s1rcolor
(q1 + theme_stata(scheme = "s1rcolor") + scale_colour_stata("s1rcolor"))

plot of chunk theme_stata

(ggplot(dsamp, aes(x=carat, y=price)) + geom_point(colour="white")
 + facet_wrap(~ clarity) + scale_colour_stata("s1rcolor")
 + ggtitle("Diamonds"))

plot of chunk theme_stata

## s1mono
(q1mono + theme_stata(scheme = "s1mono") + scale_colour_stata("mono"))

plot of chunk theme_stata

(q2 + theme_stata(scheme = "s1mono"))

plot of chunk theme_stata