[R] Justifying only the X-label

Paul Murrell p.murrell at auckland.ac.nz
Tue Apr 8 02:24:40 CEST 2003


Tony Vargas wrote:
> In the attached plot, how do I move just the X-label(Time) to the right.
> Basically, I just want to do a par ( adj = 1) on just the X-label, not
> all my labels.  Any ideas how to accomplish this?

I can't replicate your plot exactly because I don't have your data, but 
the following may help [draw the X-label in a separate call to title()]:

	par( omi = c(.5,.1,0,0))
	plot(1:10, xlab = "", ylab = "Total number of views", main = "yugo's 
Total number of views Apr.2003", type="l", col="red", xaxt = "n", 
cex.axis = 1.5, cex.main = 1.25, cex.lab = 1.25)
	temp <- 1:10
	axis(1, at = temp, labels = temp, las = 3, cex.axis = 1.5)
	title(xlab="Time", adj=1, cex.lab=1.25)

Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz

More information about the R-help mailing list