Re: [R] Re : I need some help please!

From: <J.delasHeras_at_ed.ac.uk>
Date: Sun, 03 Jun 2007 16:21:14 +0100

Quoting Bernard Colin <Bernard.Colin_at_usherbrooke.ca>:

>
> To whom it may concern,
>
> I want to plot two or more graphics in the same window by the means of the
> "plot" command. To do that, I have tried the "add=TRUE" option, but this last
> one does not work! Do you have an hint for me please?
>
> Thank you very much for your attention.
>
> Bernard Colin

You've already been offered the par(mfrow=c(x,y)) option, to plot multiple graphs into one figure.

If what you want is to plot something, and then add another one _on top_ of it, there are various ways to do that. If you're plotting lines, points, etc... you can simply use 'plot' for the first one, and 'lines' or 'points' for the others. Sometimes that's not good enough, in which case you should look at ?par again, and check the effect of par(new=T). You can make one plot, then call par(new=T) and plot again... the second plot gets drawn right on top of the first. You may have to plot without the automatic axis drawing, and specify the axes yourself (?axis)... that is also teh way to show multiple axes in plots (say a common X and two different Y axes... etc).

Jose

-- 
Dr. Jose I. de las Heras                      Email: J.delasHeras_at_ed.ac.uk
The Wellcome Trust Centre for Cell Biology    Phone: +44 (0)131 6513374
Institute for Cell & Molecular Biology        Fax:   +44 (0)131 6507360
Swann Building, Mayfield Road
University of Edinburgh
Edinburgh EH9 3JR
UK

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 03 Jun 2007 - 15:27:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 03 Jun 2007 - 15:31:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.