[R] Rotated, Right-Justified Labels for Shortened Tick Marks

David Winsemius dwinsemius at comcast.net
Thu Jan 13 05:42:15 CET 2011


On Jan 12, 2011, at 7:59 PM, dms wrote:

> Hello R-help,
>
> I'm trying to make a fairly simple plot axis that goes something like
> this:
>
> plot(-10:10,-10:10, yaxt='n')
> axis(side=2, las=1, hadj=1,  tck=-.01, cex.axis=.6)
>
> ...but as you can see, the labels are not close enough to the y-axis
> (where I want them... to save space for publication).

It's not clear what you mean by "labels" but if it is the numbers next  
to the ticks then you have already found the parameter needed, hadj.

plot(-10:10,-10:10, yaxt='n')
axis(side=2, las=1, hadj=0,  tck=-.01, cex.axis=.6)

>
> Can anybody help me figure out how to move these labels over the the
> right a bit?
>
> Thanks,


David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list