Monday, May 19, 2008

Best excuse ever

My dear friend Rafe Donahue has sent many helpful suggestions with regard to ggplot2. He comments:

Don't think of the ± of 0.2 to each of the data at the repeat
locations as modifying the data. You are not modifying the data, you
are providing a different plotting algorithm for those points that share
a location with other points.

a line of argument which it is hard not to love. I'm not saying it's not valid, no... and yet I see myself, down the years, explaining innocently that I was not actually modifying the data as such, I was just providing a different plotting algorithm etc. etc.

Meanwhile Hadley Wickham very kindly sent the correct line of code to change the y axis. I type this in, and by the simple procedure of providing a different plotting algorithm for those points that share a location with other points produce

which really is terribly nice. Further information on ggplot2 is available here.

Readers who have not spent much time with Excel charts may be inclined to accept uncritically the complaints of PP; a wealth of information on what can be achieved is available at Peltier Technical Services, here.

On the subject of providing a different plotting algorithm for data whose points overlap, Rafe reminds me that

As I said before, we did this in the
baseball plot data y putting them in little boxes. Of course, you need
to decide on the size of the box, etc, but that is the price to pay.

For those who missed the great bivariate baseball score plot the first time round, this enables the user to select a team and one or more aspects of its game history and generate a bivariate plot, for example



You can create your own plots here.

No comments: