[R] a "date" x-axis in a xyplot

Jim Lemon jim at bitwrit.com.au
Tue Nov 4 10:53:45 CET 2008


jass at in.gr wrote:
> Dear all,
>
> In the x-axis of a xyplot I define dates ,for example 01-10-2007 instead of numbers, in a range of 77 days. I would like in my output to have the whole date as a point. When I plot it, then the output is a big mess! I can not distinguish anything; the result is a thick, black line of overlapping dates.
> Is there any solution so I can really distinguish and see clearly the dates in the x-axis?
>
> Thanks in advance!
>
> Ismini
>
>   
Hi Ismini,
If you hack off the year (put 2007 in the x axis label), just print the 
day and month and use staxlab in the plotrix package with three lines, 
you might just squeeze it in. Alternatively, you could rotate the tick 
labels (srt=90) and use a small cex value.

Jim



More information about the R-help mailing list