[R] par("usr") trouble in multiplot axis scaling

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Oct 25 21:24:30 CEST 2004


Johannes Graumann wrote:
> Hello,
> 
> I'm blotting a series of growth curves into a multiplot environment
> created with layout().
> since I want the four plots to be easily visually comparable, I do the
> following:
> 
> #first plot
> plot(x,y,<stuff>)
> standarduser<-par()$usr
> ...
> <some fitting>
> ...
> lines(spline(x, <fitted_equation>))
> 
> #everything all right till here
> # second plot
> plot(x,y,<stuff>)
> par(usr=standarduser)
> ...
> <some fitting>
> ...
> lines(spline(x, <fitted_equation>))
> 
> The problem here is, that the axis of the second plot seem to be scaled
> according to the parameters of the first, BUT the fitted curve in the
> second plot isn't!
> 
> Any idea about what I'm doing wrong?
> 
> Please help this newbie out of his misery!

Can you specify a very simple reproducible example please?

Uwe Ligges

> Joh
> 
> ______________________________________________
> 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




More information about the R-help mailing list