# graphs

### An Improvement to Coefficient Plots

July 3, 2012 |

I recently posted about coefficient plots, discussing my approach and providing some example R code to create the graphs. I had the good fortune of hearing Amanda Driscoll give a talk recently, and she made a small, but really nice … Continue rea... [Read more...]

### Coefficient Plots in R

June 30, 2012 |

One popular trend in presenting results is the "coefficient plot," an alternative to the table of regression coefficients. I am seeing this a little more often in political science research and have received a few requests for code, so I … Contin... [Read more...]

### Why You Shouldn’t Conclude "No Effect" from Statistically Insignificant Slopes

June 16, 2012 |

It is quite common in political science for researchers to run statistical models, find that a coefficient for a variable is not statistically significant, and then claim that the variable "has no effect." This is equivalent to proposing a research &#8... [Read more...]

### Using Inkscape to Post-edit Labels in R Graphs

September 26, 2011 |

I discuss how to use Inkscape to easily shift around labels on graphs produced in R. Continue reading → [Read more...]

### What value is cross country GDP correlation? [Part One]

May 6, 2011 |

The above graph borders on chartjunk (and is nothing like Paul Butler’s amazing Facebook map). We can see some variation in color but mostly it is a set of lines between 152 country capitals with no means to determine which … Continue reading → [Read more...]

### Beeswarm Boxplot (and plotting it with R)

March 10, 2011 |

(The image above is called a “Beeswarm Boxplot” , the code for producing this image is provided at the end of this post) The above plot is implemented under different names in different softwares. This “Scatter Dot Beeswarm Box Violin – plot” (in the lack of an agreed upon term) is a ... [Read more...]

### Back from Philly

December 20, 2010 |

The conference in honour of Larry Brown was quite exciting, with lots of old friends gathered in Philadelphia and lots of great talks either recollecting major works of Larry and coauthors or presenting fairly interesting new works. Unsurprisingly, a large chunk of the talks was about admissibility and minimaxity, with ...

### Once again, chart critics and graph gurus welcome

December 10, 2010 |

HOW TO DISPLAY A LINE PLOT WITH COUNT INFORMATION? In a previously-mentioned paper Sharad and your DSN editor are writing up, there is the above line plot with points. The area of each point shows the count of observations. It’s done in R with ggplot2 (hooray for Hadley). We ... [Read more...]

### Le Monde puzzle [48: resolution]

December 4, 2010 |

The solution to puzzle 48 given in Le Monde this weekend is rather direct (which makes me wonder why the solution for 6 colours is still unavailable..) Here is a quick version of the solution: Consider one column, 1 say. Since 326=5×65+1, there exists one value c with at least 66 equal to c. Among [...] [Read more...]

### Le Monde puzzle [48]

December 1, 2010 |

This week(end), the Le Monde puzzle can be (re)written as follows (even though it is presented as a graph problem): Given a square 327×327 symmetric matrix A, where each non-diagonal entry is in {1,2,3,4,5} and , does there exist a triplet (i,j,k) such that Solving this problem in R ... [Read more...]

### Random graphs with fixed numbers of neighbours

November 24, 2010 |

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 ... [Read more...]

### Which chart is better?

August 10, 2010 |

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? ... [Read more...]

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

June 30, 2010 |

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 ... [Read more...]

### Response to Flowingdata Challenge: Graphing obesity trends

April 29, 2010 |

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 ... [Read more...]

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

March 23, 2010 |

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 ... [Read more...]

### Responding to the Flowingdata GDP Graph Challenge

February 25, 2010 |

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 ... [Read more...]