[R] X-Axis Label Overwritten By TickMark Values

From: Paul Roebuck <roebuck_at_wotan.mdacc.tmc.edu>
Date: Sat 01 Oct 2005 - 21:07:45 EST


Can someone tell me how to fix the left margin of plot region such that the tick values don't overwrite the x-axis label? I haven't been able to set the correct par option to fix this...

TIA



grdev <- function(...) {

    get(getOption("device"))(...)
}

plotFixMe <- function(spectrum, ...) {

    saved.par <- par(las = 1, tcl = 0.3)     on.exit(par(saved.par))

    plot(spectrum,

         type = "l",
         col  = "blue",
         xlab = "",
         ylab = "",
         ...)
    title(main = "x-axis label overwritten by tick values",
          xlab = "Index",
          ylab = "Intensity")

}

grdev()
plotFixMe(rnorm(50)*20000, ylim = c(0, 50000))



SIGSIG -- signature too long (core dumped)

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Oct 01 21:13:22 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:34 EST