[R] How to add two different axis to one plot?
A.Robinson at ms.unimelb.edu.au
Mon Jan 30 04:56:56 CET 2006
Use the axis() command to add custom axes.
To "hold" the plot, insert
between the plot statements, thus:
plot(x1, y1, etc ...)
plot(x2, y2, etc ...)
On Mon, January 30, 2006 2:49 pm, Michael said:
> Hi all,
> I need to put two different axis to one plot. On the top of the plot, I
> to put one axis, with increments from left side to the right side; then at
> the bottom of the same plot, I need to put another axis, with increments
> from right side to the left side and showing a different unit. How do I do
> By the way, is there a "hold" command for plotting?
> If I first plot a picture, how to add another "plot" command onto it
> erasing it?
> In matlab, it can be convinient done by "hold on" and "hold off"... and
> I do it in R?
> Thanks a lot,
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
Senior Lecturer in Statistics Tel: +61-3-8344-9763
Department of Mathematics and Statistics Fax: +61-3-8344 4599
University of Melbourne, VIC 3010 Australia
Email: a.robinson at ms.unimelb.edu.au Website: http://www.ms.unimelb.edu.au
More information about the R-help