# Posts Tagged ‘ graphs ’

## Random graphs with fixed numbers of neighbours

November 24, 2010
By

In connection with Le Monde puzzle #46, I eventually managed to write an R program that generates graphs with a given number n of nodes and a given number k of edges leaving each of those nodes. (My early attempt was simply too myopic to achieve any level of success when n was larger than

## Which chart is better?

August 10, 2010
By

CHART CRITICS, GRAPHICS CURMUDGEONS, COME ONE COME ALL Once upon a time there was this graph (graph 1). Andrew Gelman went all graphics curmudgeon on it, calling it an “ugly, sloppy bit of data graphics“, so it became this graph (graph 2). Now the question is, which is better: graph 2 or graph 3? Please

## Setting graph margins in R using the par() function and lots of cow milk

June 30, 2010
By

It is fairly straightforward to set the margins of a graph in R by calling the par() function with the mar (for margin!) argument. For example, par(mar=c(5.1,4.1,4.1,2.1) sets the bottom, left, top and right margins respectively of the plot region in number of lines of text. Another way is by specifying the margins in inches

## Response to Flowingdata Challenge: Graphing obesity trends

April 29, 2010
By

Nathan at Flowingata put up another interesting challenge today to improve the following graphic showing obesity trends in America. Here’s my attempt: I transposed the data so that the cohorts are on the X axis and each separate line represents an age group. So each line shows the percentage of obese people in a particular

## The “Future of Open Source” Survey – an R user’s thoughts and conclusions

March 23, 2010
By

Over a month ago, David Smith published a call for people to participate in the “Future of Open Source” Survey. 550 people (and me) took the survey, and today I got an e-mail with the news that the 2010 survey results are analysed and where published in the “Future.Of.Open.Source blog” In the following (38 slides) presentation: I would like...

## Responding to the Flowingdata GDP Graph Challenge

February 25, 2010
By

Nathan Yau of Flowingdata put up a challenge earlier today to improve upon a graph showing government spending as a percentage of GDP, published in the Economist. The underlying data wasn’t available. So I put on my graph-to-numbers glasses on and pulled out some data. Here it is in case you want to have a