Re: [R] Distance between axis and x.lab

From: Marc Schwartz <>
Date: Wed 25 Jan 2006 - 00:23:17 EST

On Tue, 2006-01-24 at 13:25 +0100, Andrej Kastrin wrote:
> Dear R useRs,
> what's the most elegant way to modify distance between x-axis and it's
> title. I didn't find any parameter to do that...
> Thank's in advance,
> cheers, Andrej

If you just want to move the x axis label and no other annotation, the easiest way is probably:

 # Draw a plot, set the x axis label to ""  plot(1:10, xlab = "")

 # Now use mtext() to do the label and move it  # away from the axis by using 'line'
 mtext(side = 1, text = "Index", line = 4)

Compare the above to:


Further flexibility is provided by the 'ann', 'axes', 'xaxt' and 'yaxt' arguments to skip other components of the plot such as titles and axes.

See ?plot.default, ?title, ?axis, ?mtext and ?text for more information.

HTH, Marc Schwartz mailing list PLEASE do read the posting guide! Received on Wed Jan 25 00:46:35 2006

This archive was generated by hypermail 2.1.8 : Wed 25 Jan 2006 - 02:39:06 EST