Created
October 29, 2015 00:31
-
-
Save tslumley/12217c1a84dec5f4a8de to your computer and use it in GitHub Desktop.
Hextri examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(hextri) | |
library(survey) | |
data(api) | |
## all hexes same orientation: looks as if middle schools went up more | |
with(apipop,hextri(api99,api00,stype,c("orange","forestgreen","purple"),nbins=20,diffuse=FALSE, | |
xlab="1999 Academic Performance Index",ylab="2000 Academic Performance Index",style="size")) | |
legend("topleft",fill=c("orange","purple","forestgreen"),legend=c("Elementary","Middle","High"),bty="n") | |
## random orientation: less pretty, but you can see middle schools went up less | |
with(apipop,hextri(api99,api00,stype,c("orange","forestgreen","purple"),nbins=20,diffuse=TRUE, | |
xlab="1999 Academic Performance Index",ylab="2000 Academic Performance Index",style="size")) | |
legend("topleft",fill=c("orange","purple","forestgreen"),legend=c("Elementary","Middle","High"),bty="n") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment