[R] Looking for parallel functionality between Matlab and R
Greg Snow
Greg.Snow at intermountainmail.org
Tue Jun 26 18:01:40 CEST 2007
For a), if you really want the plots overlayed, it is best to use
something like matplot, or use the points or lines function to add the
later plots to the first. You can also get the overlay effect using
par(new=TRUE), but then you need to be careful with axis labels and
scales and the plot may end up being more confusing then helpful.
For b), if you are just doing a quick exploration of the plot, there is
the zoomplot function in the TeachingDemos package that may work for
you. If you want a plot to print/save, it is best to specify xlim and
ylim in the initial plotting function to create it at the correct
size/zoom from the beginning.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of El-ad
> David Amir
> Sent: Tuesday, June 26, 2007 6:21 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Looking for parallel functionality between Matlab and R
>
> I'm slowly moving my statistical analysis from Matlab to R,
> and find myself missing two features:
>
> a) How do I mimic Matlab's 'hold on'? (I want to show several
> plots together, when I type two plots one after the other the
> second overwrites the first)
> b) How do I mimic Matlab's 'axis'? (after drawing my plots I
> want to zoom on specific parts- for example, x=0:5, y=0:20).
>
> Thanks for any assistance.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
More information about the R-help
mailing list