Skip to content

Instantly share code, notes, and snippets.

@JoFrhwld
Created June 18, 2012 21:04
Show Gist options
  • Save JoFrhwld/2950692 to your computer and use it in GitHub Desktop.
Save JoFrhwld/2950692 to your computer and use it in GitHub Desktop.
Overplotting for black and white graphics
ggplot(Vy, aes(F2, F1, shape = Vowel))+
geom_point()+
theme_bw()+
scale_x_continuous(name = "F2", trans = revlog_trans())+
scale_y_reverse(name = "F1")+
stat_ellipse(level = 0.95)+
opts(legend.position = "none")+
annotate(geom="text", x=2900, y = 460, label = "iyC", size = 5)+
annotate(geom="text", x=2400, y = 750, label = "eyC", size = 5)+
annotate(geom="text", x=1850, y = 970, label = "ay", size = 5)
ggplot(Vy, aes(F2, F1, color = Vowel))+
geom_point()+
scale_shape_manual(values = c(5,17,1), breaks = c("iy", "ey","ay"))+
theme_bw()+
scale_x_continuous(trans = revlog_trans())+
scale_y_reverse()+
stat_ellipse(level = 0.95)+
opts(legend.position = "none")+
annotate(geom="text", x=2900, y = 460, label = "iyC", size = 5)+
annotate(geom="text", x=2400, y = 750, label = "eyC", size = 5)+
annotate(geom="text", x=1850, y = 970, label = "ay", size = 5)
ggplot(Vy, aes(F2, F1, color = Vowel))+
geom_point(fill = "white")+
scale_shape_manual(values = c(23,17,21), breaks = c("iy", "ey","ay"))+
theme_bw()+
scale_x_continuous(trans = revlog_trans())+
scale_y_reverse()+
stat_ellipse(level = 0.95)+
opts(legend.position = "none")+
annotate(geom="text", x=2900, y = 460, label = "iyC", size = 5)+
annotate(geom="text", x=2400, y = 750, label = "eyC", size = 5)+
annotate(geom="text", x=1850, y = 970, label = "ay", size = 5)
ggplot(Vy, aes(F2, F1, color = Vowel))+
geom_point(fill = "grey80")+
scale_shape_manual(values = c(23,17,21), breaks = c("iy", "ey","ay"))+
theme_bw()+
scale_x_continuous(trans = revlog_trans())+
scale_y_reverse()+
stat_ellipse(level = 0.95)+
opts(legend.position = "none")+
annotate(geom="text", x=2900, y = 460, label = "iyC", size = 5)+
annotate(geom="text", x=2400, y = 750, label = "eyC", size = 5)+
annotate(geom="text", x=1850, y = 970, label = "ay", size = 5)
ggplot(Vy, aes(F2, F1, color = Vowel))+
geom_point()+
theme_bw()+
scale_x_continuous(trans = revlog_trans())+
scale_y_reverse()+
stat_ellipse(level = 0.95)+
opts(legend.position = "none")+
annotate(geom="text", x=2900, y = 460, label = "iyC", size = 5)+
annotate(geom="text", x=2400, y = 750, label = "eyC", size = 5)+
annotate(geom="text", x=1850, y = 970, label = "ay", size = 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment