Hi Michael,

> I'm having trouble figuring out how to format Date variables when used as
> axis labels in graphs.
> The particular case here is an attempt to re-create Nightingale's coxcomb
> graph with ggplot2,
> where I'd like the months to be labeled as "Mar 1885", "Apr 1885", using a
> date format
> of "%b %Y" applied to label the dates, or really anything other than
> "1885-03-01". I know the solution has to do with formatting the dates, while
> preserving their
> status as an ordered factor, but I don't know how to do that.

Dates are, by their very nature, ordered so you don't need to keep
them as an ordered factor.  If you don't do that you'll find that the
scale_date formatting options will work.

Hadley


-- 
http://had.co.nz/

______________________________________________
R-help@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.

Reply via email to