1. First make a plot without the axis you want using xaxt="n"
:
plot(yy,xx,xaxt="n",xlab="")
2. Then add the axis without labels
axis(side=1,at=xx,labels=FALSE)
where:
side = 1
(this example is for adding labels to the x axis)
3. Finally add the text:
text(xx,par("usr")[3] - ofst, srt = g, adj = 1,labels=labs,xpd = TRUE)
where:
par("usr")[3]
gives you the y coordinate for your x axis
ofst
is the offset at which you want to plot the labels away from the x axis (note the minus sign).
srt = g
this gives the angle to plot the labels, I like (e.g., g = 45
)
labs
is a vector of your labels
xpd=TRUE
plotting clipped to the figure region, also try xpd=NA