Re: [R] Time in ggplot2

2010-06-22 Thread Ottar Kvindesland
Excellent, thanks. This solved it. ottar On 22 June 2010 11:39, Hadley Wickham wrote: > Hi Ottar, > > It's a bug in the code that automatically figures out the axis ticks. > I have some code to fix it, but it's waiting for a release of another > package. In the meantime, you can work aroun

Re: [R] Time in ggplot2

2010-06-22 Thread Hadley Wickham
Hi Ottar, It's a bug in the code that automatically figures out the axis ticks. I have some code to fix it, but it's waiting for a release of another package. In the meantime, you can work around it by specifying where you want the breaks: ggplot(data, aes(time, PU) ) + geom_line() + scale_x

Re: [R] Time in ggplot2

2010-06-21 Thread Ottar Kvindesland
Thanks Hadley for taking the interest here. The data sets are a bit large and I have placed them available for your download on http://master.kvindesland.no/R/ You will find datasets in both Rdata and dput format. It seems that some data sets works nicely and others do not even if they come from

Re: [R] Time in ggplot2

2010-06-20 Thread Hadley Wickham
Hi Jeff, I am not aware of any problems with POSIXct and ggplot2, so I'm not sure what you're referring to. I don't ask for reproducible examples to be malicious - they make it easier for me to figure out exactly what's wrong and recommend a fix. Without a simple reproducible example, all I can

Re: [R] Time in ggplot2

2010-06-20 Thread Jeff Newmiller
That's a bit disingenuous, Hadley. There have been reports of problems with POSIXct and ggplot2 for at least six months, particularly with values that have no time portion. You have promised a fix before, but l haven't seen it, so I convert to Date to work around the bug. "Hadley Wickham" wro

Re: [R] Time in ggplot2

2010-06-20 Thread Hadley Wickham
Hi Ottar, It's impossible to tell what the problem is without a reproducible example (http://gist.github.com/270442) Hadley On Sun, Jun 20, 2010 at 4:38 PM, Ottar Kvindesland wrote: > I have a problem that puzzles me a bit today. When loading off data from a > database and plotting using ggplot

[R] Time in ggplot2

2010-06-20 Thread Ottar Kvindesland
I have a problem that puzzles me a bit today. When loading off data from a database and plotting using ggplot2, I wish to present data as a time series with time of day. The code is text-book like as shown below: # Fetch data con <- dbConnect(dbDriver("MySQL"), user="user", password = "pwd", dbnam