[R] x axis label overlap
Jim Lemon
jim at bitwrit.com.au
Wed Oct 1 12:30:22 CEST 2008
CLERC Thomas wrote:
> Hello,
>
> On the figure produced by this code:
>
> ##############
> # données Bacher 2001
> y
> .bacher
> =
> c
> (69,18,13,12,5,4,3,3,13,9,7,6,4,2,69,19,12,40,5,2,2,2,51,18,8,31,9,3,2,2
> )
> x.bacher=c(seq(1:6),8,9,seq(9,13),
> 15,15,16,17,17,18,19,20,22,22,23,25,25,26,27,28,30)
>
> # graphe
> #quartz(width=2.12,height=2.12)
> quartz(width=10,height=10)
> par(mar=c(5.1+2,4.1+2,4.1,2.1))
> plot(x.bacher,y.bacher,type="b",xlab="time",ylab="number of
> prey",cex.lab=2,pch=19,axes=FALSE)
> axis(1, at = c(1,9,15,17,22,25), side=1, labels = c("9 July","17
> July","23 July","25 July","30 July","1 August"),adj=1,cex.axis=1.8)
> axis(2,cex.axis=1.8)
> box()
> #############
>
> I want the x axis labels not to overlap, but without changing the size
> cex.axis=1.8 and without rotating them. Any idea?
>
Hi Thomas,
Have a look at staxlab in the plotrix package.
Jim
More information about the R-help
mailing list