[R] change the x axis tickmarks when using plot function in drc package
Giorgio Garziano
giorgio.garziano at ericsson.com
Wed Dec 9 17:46:06 CET 2015
Looking at the source code of the package drc, there is something that may somehow explain what
you are experiencing:
file: plot.drc.R, function addAxes(), lines 543-626
ceilingxTicks <- ceiling(log10(xaxisTicks[-1]))
...
xaxisTicks <- c(xaxisTicks[1], 10^(unique(ceilingxTicks)))
....
xLabels <- as.character(xaxisTicks)
I may suggest two options:
1. provide the x labels at plot() call time:
plot(mod, type="all", log="x", xtlab = c(-2, -1, 0, 1, 2), xlab="log(dose)")
2. try to use the option logDose in drm():
mod <- drm(y~log(dose), fct = LL.4(), logDose=10)
plot(mod, type="all")
Not sure if that second option fits your needs.
--
GG
[[alternative HTML version deleted]]
More information about the R-help
mailing list