Skip to content

John Kastellec writes,

Eduardo Leoni and I have created a web site, located at, accompanying our paper, “Using Graphs Instead of Tables in Political Science,” which is available here.

The site contains complete and annotated R code for all the graphs that appear in the paper. We hope that readers interested in turning tables into graphs can use this code to produce their own graphs in R.

We also would like your help. Because so many social scientists use Stata, we would also like to provide Stata code for creating each graph (if possible). Neither of us is fully versed in Stata graphics, however, and the site currently provides Stata code for only one of the graphs. If you have Stata code that we could apply to some of our graphs and don’t mind sharing it with us, we would greatly appreciate it. (Our email addresses can be found on the site).

Regular (or even irregular) readers of this blog will be able to guess that I am supportive of this project.


  1. Hadley says:

    Unfortunately they've gone out of their way to override a very sensible R default – the little bit of extra space between the smallest/largest point and the axis. In some of their plots it almost looks like there are some points outside of the plotting region.

    It's also disappointing to them them using base graphics to produce the plots when using lattice or ggplot could produce very similar graphics with much less effort.

  2. Bill Harris says:

    In case you haven't seen it yet, take a look at the Data Analytics plug-in for Firefox ( While it's still alpha, it offers the promise of easily graphing data you see in an online table.

    I've also found Table2Clipboard ( handy in getting data off a Web page and into another form for further analysis.

  3. MDM says:

    You might be interested in the report Marianne Zawitz and I did for the Bureau of Justice Statistics, "Displaying Violent Crime Trends
    Using Estimates from the
    National Crime Victimization Survey," (at We were trying to teach a little sampling theory as well. S-Plus was used for many of the figures.

  4. Bill Harris says:

    For completeness, I found two programs today that claim to go the other way (from graphs to tables), just in case you ever need them: and