# Effective Graphs with R

**Revolutions**, 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.

*Today's guest post is by Naomi Robbins, author of the Effective Graphs blog **—* ed.

I write a blog on effective graphs for *Forbes*. David Smith

invited me to write a guest post here that was a roundup of some of my Forbes

posts where R was used. My use of R graphics has ranged from simple box plots

and dot plots to examples of diverging stacked bar charts drawn with the likert

function of the HH package.

The audience for this blog is the general public rather than statisticians and

scientists although many of the latter regularly visit.

In Gelman's

Click-through Compromise for Statistical Graphics and Data Art I show a

superposed dot plot as a statistical graphics alternative to an artistic

visualization of revenues and profits of the Fortune 500. At a panel entitled “What Makes

Good Data Visualization,” the panelists stated that artists and

statisticians have different goals in creating visualizations. Andrew Gelman

said that artists want visualizations to be creative, grabby and innovative

while these characteristics are not the goal of statisticians. Gelman suggested

a compromise: a click-through future where we can have a figure that grabs your

attention and gets you interested. You click through to a statistical graph

that is clear, accurate, and easy to understand. Click through again and see a

spreadsheet with the data. The superposed dot plot shown in the post (and below) uses code

similar to that of Cleveland’s barley example.

One of my pet peeves is seeing spaces between the bars of a

histogram or seeing histograms called bar charts. In A

Histogram is NOT a Bar Chart, I point out

the differences between bar charts and histograms. The code used for these

figures is a simple use of hist. That post was followed by Comparing

Distributions with Box Plots, which shows the superiority of box plots (such as shown below) over

histograms for comparing distributions. The code was straightforward uses of

the lattice package. When

Should I Use Logarithmic Scales in My Charts and Graphs is another post

that makes straightforward use of dot plots with logarithmic scales.

The remaining two posts that I’ll discuss here include

diverging stacked bar charts drawn using the likert function of the HH package.

Alternative

to Charles Blow's Figure in “Newt's War on Poor Children”, written jointly

with Rich Heiberger, supports an argument in an op-ed article in the New York

Times written by Charles Blow. We redesigned the figures used by Blow to make

what we consider to be a stronger presentation with a simpler graphical style.

Thinking

Outside the Chart Menu discusses how chart menus in software discourage

thinking about the data and often cause the message the graph designer intends

to convey to be lost. In one of the examples I show a *before* figure (below) that used six pie charts to compare the age

distributions of users of six brands of a product. My *after* figure was a diverging stacked bar chart. This post is my favorite

one because it questions standard advice and encourages readers to think rather

than blindly follow rules about the right graph for their data.

*Naomi Robbins is a consultant and seminar leader who specializes in the graphical display of data. She trains employees of corporations and organizations on effective data visualization. Naomi also reviews documents and presentations for clients, suggesting improvements or alternative presentations as appropriate. She is the author of Creating More Effective Graphs, published by John Wiley (2005). In addition to her one and two day seminars on creating more effective graphs, Naomi offers short programs such as “Recognizing Misleading and Deceptive Graphs” and “How to Avoid Common Graphical Mistakes.” Naomi received a Ph.D. in mathematical statistics from Columbia University, M.A. from Cornell University, and A.B. from Bryn Mawr College. She had a long career at Bell Laboratories before forming NBR, her consulting practice.*

**leave a comment**for the author, please follow the link and comment on their blog:

**Revolutions**.

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.