[R] Orientation of labels on axes

Albert Greinoecker albert.greinoecker at uibk.ac.at
Mon Jan 7 13:08:24 CET 2008


Hi Michael,

a solution would be not to draw axes directly, but afterwards with the
axis-command:

plot(length, col=color, axes=F)
axis(2,at=<your_positions>, labels=<your_labels>, cex.axis=0.6, las=1);
# left axis
axis(1,at=<your_positions>, labels=<your_labels>, cex.axis=0.6, las=1);
# bottom axis

cex.axis...relativefont size
las...text orientation

see ?axis for further settings

cheers,
Albert

Am Montag, den 07.01.2008, 03:52 -0800 schrieb mika03:
> http://www.nabble.com/file/p14664173/at-modality.png 
> 
> 
> I created the above image with R and I have one problem left:
> 
> Some of the labels of the axes do not show up, probably because there's not
> enough space.
> 
> 
> I use the following code to create the plot:
> modality <- read.table("results.table", header=TRUE, sep=",")
> color <- c("red3","green3","blue3","orange2","purple2","brown4")
> plot(modality, col=color)
> 
> >From the manual I though one of the following might help:
> > plot(length, col=color, las=1)
> > plot(length, col=color, las=2)
> > plot(length, col=color, las=0)
> 
> This is supposed to change the orientation of the axis lables, I guess. But
> it doesn't change the output a bit.
> 
> Does anyone know what to do?
> (I am happy with almost any solution that makes the missing labels appear:
> smaller fonts, rotating the labels etc.)
> 
> Cheers,
> Michael
> 
>




More information about the R-help mailing list