Skip to content

Instantly share code, notes, and snippets.

@drewconway
Created March 25, 2010 22:28
Show Gist options
  • Save drewconway/344215 to your computer and use it in GitHub Desktop.
Save drewconway/344215 to your computer and use it in GitHub Desktop.
# Visualize data and save
png("Tax_percentage.png",height=1000,width=1000,res=100)
ggplot(frum_data,aes(tax1))+stat_density()+geom_vline(aes(xintercept=31.5,colour="Actual Value"))+opts(title="In approximate percentage terms, how much is the U.S. (federal)
government currently taking out of the U.S. economy in taxation?",plot.title=theme_text(size = 12))+xlab("Simulated Tea Party Survey Response Distribution")+ylab("Density")
dev.off()
png("Tax_family.png",height=1000,width=1000,res=100)
ggplot(frum_data,aes(tax2))+stat_density()+geom_vline(aes(xintercept=7.5,colour="Actual Value"))+opts(title="How much federal income tax do you think a typical family
earning $50,000 pays (in 1,000 dollars)?",plot.title=theme_text(size = 12))+xlab("Simulated Tea Party Survey Response Distribution")+ylab("Density")
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment