Halloween 2011 count

October 31, 2011
By

(This article was first published on The stupidest thing... » R, and kindly contributed to R-bloggers)

We don’t get many kids seeking candy at our house. I’m not sure if there just aren’t many kids in the neighborhood, or if it’s our location (next to the pond, with a big gap before the next house).

I decided to keep track. As usual, we bought a huge bag of candy, and we still had about half of it left to hand out tonight. But only 19 kids came.

They arrived pretty regularly from 5:50 to 7:50.

I comment on the figure’s style below.

In the above graph, I’m applying ideas learned from Dan Carr when I visited the statistics department at George Mason in September, to give a seminar. (I had a great time at GMU, particularly talking to Dan about graphics. I had a copy of his book about micromaps on my iPad, but hadn’t really looked at it until after I met him. Take a look at the first chapter; it’s full of good ideas and may convince you to read the rest.)

  • The gray background makes the figure stand out on the “page”. (I had disliked this aspect of ggplot2 plots (for example, this one), but Dan convinced me that it’s better.)
  • The black border around the figure is important. (Dan pointed out that it’s not the gray background I dislike about the default ggplot2 plots, but the lack of the border.)
  • The white grid lines make it easy to see the details, and they still don’t get in the way of the plot.
  • With the grid lines, you don’t need to include tick marks, but can just use proximity. (Note that the labels can and should be closer to the plot when there are no bristles ticks.)
  • The use of color for the actual data makes them stand out better.

Update: The code I used for the figure is here. It’s old-fashioned and inefficient, but it works.


To leave a comment for the author, please follow the link and comment on his blog: The stupidest thing... » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.