[R] plot.ts panel function

Dieter Menne dieter.menne at menne-biomed.de
Wed Jul 12 11:30:24 CEST 2006


Matthias Braeunig <mb.atelier <at> web.de> writes:

> 
> How can I set the ylim in individual panels of a "multiple" plot.ts?
> The panels are all scaled to fully fit the series inside. But I need
> specific scales, and colors ....
> 
> Here is an example:
> 
> plot.ts(cbind(1:10,1:10/10),ylim=c(0,3))	# ylim has no effect
> 
Personally, I tend to believe that this is an issue (being careful to avoid the
zoological word, which is reseved for core members) in plot.ts, where xlim and
ylim are not included in one of the plot.default calls. It works when you change
(around line 40 in plot.ts) to

  plot.default(x[, i], axes = FALSE, xlab = "",
      ylab = "", log = log, col = col, bg = bg, pch = pch,
       ann = ann, type = "n",xlim=xlim,ylim=ylim, ...)

But I am sure, that there were reasons to omit this, and I have not read the
documentation carefully.

Dieter



More information about the R-help mailing list