[R] change the x axis tickmarks when using plot function in drc package

li li hannah.hlx at gmail.com
Wed Dec 9 19:24:04 CET 2015


Thanks for your help Giorgio! Both options worked.

2015-12-09 11:46 GMT-05:00 Giorgio Garziano <giorgio.garziano at ericsson.com>:

> 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]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list