[R] beginner plotting with dates

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Tue Mar 11 15:37:51 CET 2003


On Tue, 11 Mar 2003, Rebecca Freeman Grais wrote:

> I am a beginner and have a question about plotting dates.  I am creating 
> a very simple boxwhisker plot , boxplot(Total Case~Month).  When the 
> boxplot appears, the months are re-ordered alphabetically.  I would like 
> to be able to preserve the order, i.e. Jan, Feb, March, etc.  Is there a 
> way to set the x-axis so that it is not automatically re-ordered? Thanks 
> in advance for your help.

No, but you can set up Month (a factor?) with the levels in the order you 
want, and then boxplot will follow.  See ?factor.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list