# Good online resource with tips on graphing association between two numeric variables under various conditions

### Context:

Over the while I've acquired a set of heuristics on how to effectively plot the association between two numeric variables. I imagine most people who work with data would have a similar set of rules.

Examples of such rules might be:

• If one of the variables is positively skewed, consider plotting that axis on a log scale.
• If there are a lot of data points (e.g., n > 1000), adopt a different strategy such as using some form of partial transparency, or sampling the data;
• If one of the variables takes on a limited number of discrete categories, consider using a jitter or a sunflower plot;
• If there are three or more variables, consider using a scatterplot matrix;
• Fitting some form of trend line is often useful;
• Adjust the size of the plotting character to the sample size (for bigger n, use a smaller plotting character);
• and so on.

### Question:

I'd like to be able to refer students to a web page or site that explains these and other tricks for effectively plotting associations between two numeric variables, perhaps with examples.

• Are there any pages or sites on the internet that do a good job of this?
• If you can find it, the printed "Graphics" manual that came with older copies of Systat (pre-Windows, believe it or not) would be an excellent resource. Not only did it illustrate all these rules (as I recall), it was full of pithy and excellent advice. – whuber Jul 18 '11 at 12:57
• @whuber, a great comment. Leland Wilkinson, the primary author of Systat, and also the author of The Grammar of Graphics (which is more of a computer science book than a statistics book), has a very fine taste for graphical display of data. His presentations are always very effective in delivering their messages. – StasK Sep 30 '11 at 13:54
• @Jeromy, you may already know the ggplot2 package for R, but now that The Grammar of Graphics was mentioned, I thought to mention it too. I find the package, the book and the online reference manual by Hadley Wickham very useful for turning numeric variables into useful plots and graphics. – NRH Oct 4 '11 at 7:16
• @Jeromy why not rephrase the question (separately) as a community wiki, requesting one post per rule? That way, rather than a set of links, we could have a votable set of rules and create the resource here. – David LeBauer Oct 6 '11 at 14:10
• @David Okay, I've added a general community wiki question on best resources for designing plots stats.stackexchange.com/questions/16631/… – Jeromy Anglim Oct 6 '11 at 21:41

I can't think of great online resources off the top of my head, but a nice (and easily downloadable) book chapter that narrates how to visually explore a large, multidimensional data set in a thoughtful way is Brendan O'Connor and Lukas Biewald's chapter (warning: link is directly to a PDF) from Beautiful Data. The chapter is particularly useful as a teaching resource because it incorporates R code into the narrative.

Also, upon further reflection, I think John Tukey's classic "Some Graphic and Semigraphic Displays" (conveniently posted on Edward Tufte's website) is a really wonderful, albeit somewhat idiosyncratic, introduction to visualization.

For some reason, I seem to be thinking of book chapters...

• +1 At least these chapters are available on the Web: I think that qualifies. Thanks, Aaron. – whuber Sep 30 '11 at 16:26
• @ whuber thanks for posting the bounty; and @ashaw both links make for interesting reading. – Jeromy Anglim Oct 3 '11 at 21:51
• I notice that the Tukey article is a predecessor of the expanded treatment found in his book EDA (1977) (excepting the final section on hanging rootograms and histograms). – whuber Oct 5 '11 at 4:49

### Older, but relevant resources

• SIGGGRAPH provides some excellent tutorials, though lacking examples, including:

• A good summary of Tufte can be found here:

• +1 The rules and tutorials look useful, comprehensive--and forbidding! How is it possible to write about graphics without providing a single illustration? :-) – whuber Oct 5 '11 at 4:50
• The choice was difficult, but I have awarded the bounty to this reply because overall it best addresses the question as asked. The UN document appears to be especially useful and accessible to students, with its plain language and many clear examples. – whuber Oct 6 '11 at 21:38