Try library(zoo) plot(zoo(t.mbaye3), ylim = c(0, 20))
or to put them all on the same plot: plot(zoo(t.mbaye3), screen = 1, col = 1:10) On Sat, Feb 7, 2009 at 2:07 PM, Dominik Hattrup <dominik.hatt...@googlemail.com> wrote: > It's working now! Thank You Guys!! > > t.mbaye3 <- t(mbaye3) > plot(ts(t.mbaye3)) > > Now I am searching for an alternative to ylim, which is not working. I > am not the first one :): > > https://stat.ethz.ch/pipermail/r-help/2004-October/059376.html > > https://stat.ethz.ch/pipermail/r-help/2006-July/109085.html > > Dominik > > David Winsemius schrieb: >> Thanks. It did give me the opportunity to discover one reason why >> dput(<object>) may not be a totally general solution to the problem of >> minimizing R-help responder time. That structure depends on an object >> that is not included, namely the mbaye dataset that you constructed >> mbaye3 from. I was able to trim out the call and remove the xtabs class >> from that structure and would have been able to test my theory (and that >> Gabor already confirmed) that the problem was that the plot.ts required >> a column oriented series and that the transpose operation was needed. >> >> This was my trimmed version of mbaye3 which R accepted as valid in the >> absence of "mbaye": >> >> mbaye3 <- structure(c(0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, >> 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, >> 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 0, >> 0, 1, 3, 1, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 0, 1, 6, 0, 0, 0, 2, >> 0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 1, 0, 2, 13, 3, 0, 0, 2, >> 1, 2, 3, 0, 1, 7, 2, 0, 0, 3, 2, 5, 1, 0, 1, 13, 0, 0, 0, 1, >> 1, 5, 6, 3, 1, 6, 1, 0, 0, 2, 1, 1, 6, 3, 1, 20, 4, 0, 0, 4, >> 1, 2, 3, 4, 0, 15, 0, 0, 0, 1, 0, 2, 2, 9, 1, 9, 2, 0, 0, 0, >> 2, 3, 5, 6, 3, 5, 1, 0, 0, 0, 2, 6, 3, 6, 2, 16, 4, 0, 4, 4, >> 0, 3, 3, 5, 0, 5, 1, 1, 3, 2, 1, 3, 1, 5, 3, 8, 3, 0, 2, 0, 0, >> 1, 4, 1, 2, 5, 1, 1, 5, 3, 0, 2, 2, 1, 0, 5, 3, 0, 3, 0), .Dim = c(10L, >> 22L), .Dimnames = structure(list(name = c("Denmark", "France", >> "Germany", "Greece", "Ireland", "Italy", "Netherlands", "Portugal", >> "Spain", "UK"), year = c("1972", "1973", "1974", "1975", "1976", >> "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", >> "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", >> "1993")), .Names = c("name", "year")), class = c( "table" >> )) >> >> > > -- > Dominik Hattrup > > > > > > > ______________________________________________ > 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. > > ______________________________________________ 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.