[R] Adding x and y axis labels with the function plot.sensFun (package FME)
Thomas Petzoldt
thpe at simecol.de
Thu Jan 26 01:02:15 CET 2017
Hi,
I reproduced your example and it worked for me with "Time" and
"Population size" as axis labels. Are you using the most recent version?
Thomas
Am 25.01.2017 um 02:32 schrieb Marine Regis:
> Hello,
>
>
> How can I add x and y axis labels for a plot that is built from the function plot.sensFun (package FME) ? I tested xlab ="Time" and ylab="Population size" but this doesn't work for me.
>
>
> Here is a code to generate the plot:
>
>
> pars <- list(gmax = 0.5, eff = 0.5,
> ks = 0.5, rB = 0.01, dB = 0.01)
>
> solveBact <- function(pars) {
> derivs <- function(t, state, pars) { # returns rate of change
> with (as.list(c(state, pars)), {
> dBact <- gmax * eff * Sub/(Sub + ks) * Bact - dB * Bact - rB * Bact
> dSub <- -gmax * Sub/(Sub + ks) * Bact + dB * Bact
> return(list(c(dBact, dSub)))
> })
> }
> state <- c(Bact = 0.1, Sub = 100)
> tout <- seq(0, 50, by = 0.5)
> ## ode solves the model by integration ...
> return(as.data.frame(ode(y = state, times = tout, func = derivs,
> parms = pars)))
> }
>
> ## sensitivity functions
> SF <- sensFun(func = solveBact, parms = pars,
> sensvar = c("Bact", "Sub"), varscale = 1)
> par(mfrow = c(1,2))
> plot(SF, which = c("Sub", "Bact"), mfrow = NULL, xlab="Time", ylab="Population size")
>
> Thanks a lot for your time.
> Marine
>
>
> [[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.
>
More information about the R-help
mailing list