Dear r-helpers,
In basic graphics, I have a figure with x and y axes suppresed. I
would like to move the xlab and the ylab closer to the axes. Do I
have to use mtext()?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
McCormick Road Charlottesville, VA 22903
Office: B011 +1-434-982-4729
Lab: B019 +1-434-982-4751
Fax: +1-434-982-4766
WWW: http://www.people.virginia.edu/~mk9y/
On Tue, 2007-02-20 at 11:31 -0500, Michael Kubovy wrote:> Dear r-helpers, > > In basic graphics, I have a figure with x and y axes suppresed. I > would like to move the xlab and the ylab closer to the axes. Do I > have to use mtext()?Michael, You could set the first value in par("mgp") in the plot() call. Compare: # Default values plot(1, mgp = c(3, 1, 0), axes = FALSE) # Move the labels closer plot(1, mgp = c(1, 1, 0), axes = FALSE) Changing that value is comparable to changing the 'line' argument in mtext(). See ?par HTH, Marc Schwartz