Message-ID: <4D2EA17D.1080805@bitwrit.com.au>
Date: 2011-01-13T06:53:49Z
From: Jim Lemon
Subject: Rotated, Right-Justified Labels for Shortened Tick Marks
In-Reply-To: <2072099d-2ec9-44d3-8fb5-426ab516adf8@fm22g2000vbb.googlegroups.com>
On 01/13/2011 11:59 AM, 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).
>
> Can anybody help me figure out how to move these labels over the the
> right a bit?
>
Hi D,
Try this:
plot(-10:10,-10:10, yaxt='n')
axis(side=2,at=seq(-10,10,by=5),labels=rep("",5),tck=-.01)
par(cex=0.6)
mtext(seq(-10,10,by=5),at=seq(-10,10,by=5),side=2,line=0.3,cex=0.6)
par(cex=1)
Jim