Leave the mgp setting alone and use xlab='' when you create the original plot. This will put the y-label in the usual place and not create the x-label. Then use the "title" or "mtext" function to place the x label where you want it.
Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Marlin Keith Cox > Sent: Wednesday, July 15, 2009 6:41 PM > To: r-help@r-project.org > Subject: [R] axis label config mgp > > I have long axis labels (8units) on the x axis and 2 unit number labels > on > the y axis. I need to move the x axis title without moving the y axis > title. I have used mgp=c(title, label and line), but mgp moves both > the x > and y titles. The following puts the y axis title way way out to the > left. > Anyone know how to move just the x axis. > X11() > conif<-c("Control", "Switched Wires", "Salt", "Conductive Board", > "Needle > Size", "Needle Depth") > par(family="serif", cex=1.2) > par(mfrow=c(1,2),lab=c(length(conif),4,4),mar=c(16.1,10.1,4.1,2.1), > mgp=c(10,1,0)) > boxplotR<-boxplot(R ~ Trt, xlab="Configuration",ylab="Resistance > (Ohms)", > xaxt='n', cex.axis=1.6,cex.lab=1.6) > axis(side=1, at=c(1,2,3,4,5,6), labels=conif, las=2, cex.axis=1.4) > -- > > kc > > > Keith Cox, Ph.D. > Alaska NOAA Fisheries, National Marine Fisheries Service > P.O. Box 464 > Sitka, Alaska, 99835 > > 907 752-0563 > marlink...@gmail.com > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.