[R] Re: combined graph in R

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Fri Jul 9 13:57:09 CEST 2004

bavorak at klobouk.fsv.cvut.cz wrote:
>  Hello,
>   I could not yet create combined graph in R. To avoid misunderstands,
>  three examples (originally created in Quattro pro) have been attached.

  Only one graph seems to have made it through to the mailing list. You 
should avoid posting things with attachments.

  My initial response is "Why?". This graph is horrible. Most of the 
information is obscured by the overlapping graphics. You can't see the 
red line for about 90% of the plot, although it occasionally peeks out 
between the green and yellow. The spikes seem to be clipped at the top 
of the plot (do the values go higher or is there a hard limit on what 
they can go up to?) and the sharpness of the spikes makes it hard to 
tell what's going on.

  The X-axis numbering is in increments of 11. Do you have an extra 
finger? And which of the numerous tick marks corresponds to the number?
>  Can you send me an algorithm to plot this in this form?
  We could probably do better, but the data didn't make it through 
either. The important thing with any plot is to design it to help tell 
the viewer what you want to say. All this plot says to me is 'the green 
and yellow are correlated (when not obscured by blue)', 'blue and red 
spikes seem correlated (when red not obscured)', and 'blue and red are 
more spiky than green and yellow'.

  Look at the documentation for 'matplot', which draws multiple lines 
from a matrix of data. I'd plot the data as simple lines, not coloured 
areas, so there's less obscuring, and probably transform the Y-values to 
smooth it out a bit. R will automatically make the X-axis values in 
multiples of 5 or 10, and give you a decent number of tick marks. You 
can even have the X-axis labeled with the calendar date.

  This is a classic example of bad spreadsheet graphics!


More information about the R-help mailing list