Skip to content

Instantly share code, notes, and snippets.

@kjhealy
Created October 31, 2008 18:29
Show Gist options
  • Save kjhealy/21382 to your computer and use it in GitHub Desktop.
Save kjhealy/21382 to your computer and use it in GitHub Desktop.
library(lattice)
data <- read.csv("cities.csv",header=TRUE,row.names=1)
quartz()
stripplot(log(data$Population),groups=data$Outcome)
dev.off()
pdf(file="cities.pdf",height=8,width=8)
dotchart(log(data$Population), groups=data$Outcome,xlab="log Population")
dev.off()
pdf(file="cities-rank.pdf",height=8,width=8)
dotchart(-data$Rank, groups=data$Outcome,xlab="Rank Population")
dev.off()
pdf(file="cities-media.pdf",height=8,width=8)
dotchart(log(data$Population), groups=data$Media,xlab="log Population")
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment