| From: | Sam Albers <tonights...@gmail.com> |
| To: | ggplot2 <ggp...@googlegroups.com> |
| Date: | 06/05/2012 03:22 PM |
| Subject: | Dates as facets |
| Sent by: | ggp...@googlegroups.com |
--
You received this message because you are subscribed to the ggplot2 mailing
list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
| From: | Sam Albers <tonights...@gmail.com> |
| To: | adam.l...@pnc.com |
| Cc: | ggplot2 <ggp...@googlegroups.com> |
| Date: | 06/05/2012 05:14 PM |
| Subject: | Re: Dates as facets |
| Sent by: | ggp...@googlegroups.com |
My apologies.
I recently confronted this issue, so I figured I'd respond. But in fact, this wasn't the solution (obviously). What I did, which worked for me, was similar to the following:
df$date.factor <-as.factor(df$date.form)facet_wrap(~date.factor)
ggplot(df, aes(y=y,x=x)) +
geom_point() +
Point is, if your data arrives as factors, and you convert it to date form, converting it back will allow you to facet it and do so in the correct order.
Hope this helps. BTW, I searched the forum for a better answer than mine and didn't find one but would be interested to know if this issue is fixed somehow.