[R] Time Series Graphics - "cannot plot more than 10 series"

David Winsemius dwinsemius at comcast.net
Sat Feb 7 17:34:01 CET 2009


I am not an expert, but I will sometimes take a shot at answering a  
question when the construction of an example it not too difficult. In  
your case that does not occur. I would need to do multiple cut and  
pastes and spend a bunch of time doing unnecessary work. I have zoo  
and tseries packages loaded and mbaye3 does not seem to be available.  
So the question arises: Why don't more questioners to the R-help list  
use the function dput?

Had you give us the output of dput(mbaye3), then testing solutions  
would become much more immediate. It would often disclose the answer  
to class related puzzles as well. Here's an example:

 > dput(DF)
structure(list(Month = structure(c(2L, 2L, 2L, 2L, 1L, 1L, 1L,
1L, 3L, 3L, 3L, 3L, 3L), .Label = c("Aug", "July", "Sept"), class =  
"factor"),
     Week = 27:39, Estpassage = c(665L, 2232L, 9241L, 28464L,
     41049L, 82216L, 230411L, 358541L, 747839L, 459682L, 609567L,
     979475L, 837189L), MedFL = c(34L, 35L, 35L, 35L, 35L, 35L,
     35L, 35L, 35L, 36L, 36L, 36L, 36L)), .Names = c("Month",
"Week", "Estpassage", "MedFL"), class = "data.frame", row.names = c(NA,
-13L))

Reversal of the process is trivial.

 > DF2 <- structure(list(Month = structure(c(2L, 2L, 2L, 2L, 1L, 1L, 1L,
+ 1L, 3L, 3L, 3L, 3L, 3L), .Label = c("Aug", "July", "Sept"), class =  
"factor"),
+     Week = 27:39, Estpassage = c(665L, 2232L, 9241L, 28464L,
+     41049L, 82216L, 230411L, 358541L, 747839L, 459682L, 609567L,
+     979475L, 837189L), MedFL = c(34L, 35L, 35L, 35L, 35L, 35L,
+     35L, 35L, 35L, 36L, 36L, 36L, 36L)), .Names = c("Month",
+ "Week", "Estpassage", "MedFL"), class = "data.frame", row.names =  
c(NA,
+ -13L))
 > DF2
    Month Week Estpassage MedFL
1   July   27        665    34
2   July   28       2232    35
3   July   29       9241    35
4   July   30      28464    35
5    Aug   31      41049    35
6    Aug   32      82216    35
7    Aug   33     230411    35
8    Aug   34     358541    35
9   Sept   35     747839    35
10  Sept   36     459682    36
11  Sept   37     609567    36
12  Sept   38     979475    36
13  Sept   39     837189    36

-- 
David Winsemius

On Feb 7, 2009, at 11:12 AM, Dominik Hattrup wrote:

> Hi Experts,
>
> I would like to present time series data in meaningful way in building
> some graphics. I've tried:
>
> (1) 	plot(ts(mbaye3))
>
> and
>
> (2)	plot(ts(mbaye3), start=1990)
>
> But I always get this error-message:
>
> 	Fehler [error] in plotts(x = x, y = y, plot.type = plot.type, 			
> xy.labels = xy.labels,  :
>  	cannot plot more than 10 series as "multiple"
>
>
> my data:
>
> mbaye3
>             year
> name          1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982
> 1983 1984
>  Denmark        0    0    0    0    0    0    1    0    0    0    1
> 2    1
>  France         0    1    0    0    1    0    3    0    0    0    2
> 5    5
>  Germany        0    0    1    0    0    0    1    0    0    1    3
> 1    6
>  Greece         0    0    0    0    0    0    0    0    0    0    0
> 0    3
>  Ireland        0    0    0    0    0    1    0    1    1    2    1
> 1    1
>  Italy          3    0    0    1    2    3    4    6    8   13    7
> 13    6
>  Netherlands    0    0    0    0    0    1    0    0    0    3    2
> 0    1
>  Portugal       0    0    0    0    0    0    0    0    0    0    0
> 0    0
>  Spain          0    0    0    0    0    0    0    0    0    0    0
> 0    0
>  UK             0    0    0    0    0    0    3    2    0    2    3
> 1    2
>             year
> name          1985 1986 1987 1988 1989 1990 1991 1992 1993
>  Denmark        1    1    0    2    2    0    1    0    0
>  France         1    2    2    3    6    3    3    1    2
>  Germany        6    3    2    5    3    3    1    4    2
>  Greece         3    4    9    6    6    5    5    1    1
>  Ireland        1    0    1    3    2    0    3    2    0
>  Italy         20   15    9    5   16    5    8    5    5
>  Netherlands    4    0    2    1    4    1    3    1    3
>  Portugal       0    0    0    0    0    1    0    1    0
>  Spain          0    0    0    0    4    3    2    5    3
>  UK             4    1    0    0    4    2    0    3    0
>
>
>
> THX,
>
>
> -- 
> Dominik Hattrup
>
> University of Mannheim
> Faculty of Social Sciences
> B.A. Political Science
>
>
>
>
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list