[R] Dates as x axis labels
sam.halliday at gmail.com
Mon Dec 8 19:27:25 CET 2008
I wish to plot several hundred data groups in a boxplot(), with
sensible labels on the x axis. For small datasets, this is possible by
using the "names" parameter to the boxplot. However, for several
hundred boxplots, boxplot() displays a tick on the x axis for every one.
For my case, I am using Date objects from the chron package as the x
labels. When passing a vector of Dates to plot() as the x values,
plot() is intelligent enough to choose sensible major tick marks (e.g.
the month name). Whereas boxplot() is picking arbitrary dates to show
as the major tick marks.
Does anybody know how to use Dates as labels in a boxplot() and have
it use sensible values as the major tick marks?
Note that I've tried using axis.Date() but it doesn't seem to do
anything to a boxplot().
More information about the R-help