[R] axis.break on Date-x-axis in lattice xyplot

From: Henning Wildhagen <HWildhagen_at_gmx.de>
Date: Mon, 28 Jul 2008 12:19:35 +0200


Dear list,

i am using the following code to produce  a lattice xyplot, but the axis.break-function is seemingly not executed.

Date<-seq(as.Date("2006-08-29"), as.Date("2007-08-28"), by="2 weeks") Period<-

var1<-rnorm(27, 90000000, 30000000)
var2<-rnorm(27, 500000000,250000000)
var3<-rnorm(27, 1000000,500000)
var4<-rnorm(27, 600000,300000)
var5<-rnorm(27, 50000, 25000)

Start<-as.Date("2006-08-01") ##1. August 2006 End<-as.Date("2007-09-01") ##31. August 2007 Periode<-seq(Start, End, by="month")

df<-data.frame(Date,var1,var2,var3,var4,var5)

library(reshape)

df<-melt(df, id="Date")

library(lattice)
library(plotrix)

P<-xyplot(df$value~df$Date|df$variable,

scales=list(x=list(at=Periode,rot=60,tck=-1,format="%d.%b.%Y",alternating=F), y=list(relation="free",rot=0
)),

axis.break(axis=1,
breakpos="2007-01-01",style="gap",bgcol="white",breakcol="black",brw=0.1)
)

This code is resulting in an error,  the problem is the specification of the breakpos-Argument, but I donīt know what "user units" in this case are.

Can anyone help me?

Thanks, Henning     

-- 



	[[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 Mon 28 Jul 2008 - 10:35:40 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 Mon 28 Jul 2008 - 12:32:44 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