Job grade plot

[This article was first published on Learning R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This plot:

was created using the following R code:

plot (q9e~q8, type = “n”,
xlim = c(1,13), ylim = c(1,13),
cex.lab=1.25,cex.axis=0.75,
col.lab = “#333333”,
xlab = “Obama job grade”,
ylab = “Congressional job grade”,
xaxt =”n”, yaxt=”n”,
main=”Obama and Congressional 100 day job grades”)

abline (or,lwd=2,col=”red”)
abline (od,lwd=2,col=”blue”)


axis(1,at=c(1,2,3,4,5,6,7,8,9,10,11,12,13),
lab=c(“A+”,”A”,”A-“,”B+”,”B”,”B-“,”C+”,”C”,”C-“,”D+”,”D”,”D-“,”F”),
col.lab=”#333333″, col.axis=”#333333″, tck=-0.02, cex.axis=0.75)

axis(2,at=c(1,2,3,4,5,6,7,8,9,10,11,12,13),
lab=c(“A+”,”A”,”A-“,”B+”,”B”,”B-“,”C+”,”C”,”C-“,”D+”,”D”,”D-“,”F”),
col.lab=”#333333″, col.axis=”#333333″, tck=-0.02, cex.axis=0.75)

text (5,6, “Democrats”,col=”blue”)
text (4,9.5, “Republicans”,col=”red”)
text(3,1,”Source: CNN/ORC Poll, April 2009″,col=”#777777″,cex=0.75)

To leave a comment for the author, please follow the link and comment on their blog: Learning R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)