[R] Two lines, two scales, one graph

Rolf Turner r.turner at auckland.ac.nz
Mon Aug 24 23:53:17 CEST 2009


On 25/08/2009, at 3:00 AM, Rick wrote:

>
> First of all, thanks to everyone who answers these questions - it's
> most helpful.
>
> I'm new to R and despite searching have not found an example of what I
> want to do (there are some good beginner's guides and a lot of complex
> plots, but  I haven't found this).
>
> I would like to plot two variables against the same abscissa  
> values. They
> have different scales. I've found how to make a second axis on the  
> right
> for labeling, but not how to plot two lines at different scales.

(1) First of all ***DON'T*** do it!  It's very bad graphical practice  
and
will mislead the viewer with probability 1.

(2) If you bloody-mindedly ***insist*** on doing it, see:

http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-base:2yaxes

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}




More information about the R-help mailing list