Dear list, 

i am trying to plot data in a way like this:

Date<-seq(as.Date("2006-08-29"), as.Date("2007-08-28"), by="2 weeks")
var<-rnorm(27, 10000, 2500)
err<-rnorm(27, 3000, 1000)
df<-data.frame(cbind(Date, var, err))

library(ggplot2)

g <- ggplot(df, aes(x=Date, y=var, 
min=(var - err), max=(var + err)))

g1 <- g + geom_line() + geom_point() + geom_errorbar(width=2, linetype=1)

g2<-g1+scale_x_date(format="%d.%b.%Y")

It works, however i am not satisfied with the output. I would like to have 
the x-axis starting at "2006-08-01" and ending at "2007-08-31" with tick 
marks and labels and each 1st of the months.

I managed to do this with a trellis plot by defining 

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

and then using "Period" as argument in scales(at). 

How can I succeed in ggplot2?

Cheers,

Henning



    
-- 

Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx

	[[alternative HTML version deleted]]

