Re: [R] Multiple time series plots

From: stephen sefick <ssefick_at_gmail.com>
Date: Wed, 02 Jul 2008 12:57:20 -0400

have you tried package(zoo) it works very well and should do what you want

On Wed, Jul 2, 2008 at 10:54 AM, Kerpel, John <John.Kerpel_at_infores.com> wrote:

> Hi all:
>
>
>
> I'm trying to plot two time series created in Rmetrics and label the
> x-axis with dates. I tried the following:
>
>
>
> dates <- as.Date(seriesPositions(x.agg))
>
>
>
> r <- as.Date(range(dates))
>
>
>
> ts.plot(x.agg_at_Data[,c(1,5)],gpars=list(ylab="Volume",
> lty=c(1:2),xaxt="n",main="Plot of Volume"))
>
>
>
> axis.Date(1, at=seq(r[1], r[2], length.out=10),
> format="%Y-%m-%d",cex.axis=.75)
>
>
>
> legend("bottomleft",legend=c("Base Volume","Model Base
> Volume"),lty=c(1,2),inset=.01,cex=.5,adj=0)
>
>
>
> All this works fine, except I don't get the dates on the x-axis like I
> want. When I try to plot a single series using "plot" it works as
> expected.
>
>
>
> Any advice?
>
>
>
> John
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods. We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

	[[alternative HTML version deleted]]

______________________________________________
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.
Received on Wed 02 Jul 2008 - 17:05:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jul 2008 - 18:31:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive