[R] X-Axis Label Overwritten By TickMark Values
Paul Roebuck
roebuck at wotan.mdacc.tmc.edu
Sat Oct 1 13:07:45 CEST 2005
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)
More information about the R-help
mailing list