[R] X axis label as months

Jim Lemon jim at bitwrit.com.au
Thu Aug 22 00:37:29 CEST 2013


On 08/22/2013 07:56 AM, Prof J C Nash (U30A) wrote:
> There are several items on the web about putting month names as tick
> labels on x axis of time plots, but I found when I tried them they did
> not work for me. After an hour or so of driving myself silly looking for
> a bug in my code, I've prepared a reproducible example below, where I
> did find a workaround, but would prefer to be able to plot a ts object.
>
> Perhaps someone can spot the error in this. I'm sure it's something
> silly or fumble-fingered.
>
> JN
>
Hi,
Try this:

library(plotrix)
staxlab(1, at=1:28, label=months)

Jim



More information about the R-help mailing list