On 03/22/2012 05:42 AM, Alaios wrote:
Would it be possible to change the axis at the end?
My data sets seem to be quite large so I was thinking for the plot and
the consequent lines to keep always
the current minimum and maximum like
plot(x)
minimum=min(x)
lines(x1)
minimum=c(minimum,x1)
lines(x2)
minimum=c(minimum,x2)
then if there is a good way for altering axis lines I could put the
limits I want to.

Hi Alex,
One way or another you are going to have to set the limits in your first call to "plot". You could do the plot first and collect the limits along the way, then do it again, but I can't see that this has any advantage over calculating the limits for the entire set of data that is to be plotted at the beginning and then doing the plots. If you want to get the limits for each data set separately, maybe:

range1<-range(x1)
range2<-range(x2)
range3<-range(x3)
ylim<-range(c(range1,range2,range3))

However, I suspect that this is of more use in helping you understand what is happening than actually getting it done.

Jim

______________________________________________
R-help@r-project.org 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.

Reply via email to