[R] More Plots
tristan.rouyer at ifremer.fr
Tue Aug 8 18:54:34 CEST 2006
sonal at deepfoo.com a écrit :
> How can we plot two graphs ex. lets say correlation & ratio in the same
> I mean in the window I have :
> 1. Graph of correlation having X & Y axes
> 2. Graph of ratio having A & B axes
> one above the other.
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
you can simply do that using the command par(new=TRUE) between your two
As you can notice the second plot is roughly added to the new one, even
if the scales are different. So you basically have to specify the axes
of the second plot, using the axis() command (after specifying xaxt='n'
and yaxt='n' in the second plot for removing its axes).
More information about the R-help