0

Hi I am trying to change the scale on the x-axis to a log scale on a plot generated by

model2 <- nlme(consumption~Q*10^(5*(exp(-alpha*Q*price)-1)), fixed=Q+alpha~1,`random=Q+alpha~1|ratid, groups = ~ treatment,`data = oxydata, start = c(Q=3, alpha=0.001))

plot(augPred(model2), log='x', xlim = c(1,3000), xlab = "Price (resp/mg", ylab = "Consumption")

However, the log='x' or log="x" does nothing to change the x-axis scale. I can change the xlim and ylim, add titles etc. but I can't seem to change the x-axis to a log scale. Any help or verification that it can or can't be done is greatly appreciated.

Ugly plot with data all crammed

Tom
  • 9,725
  • 3
  • 31
  • 48

1 Answers1

0

Thanks to anyone that was trying to figure this out, but I got it. This function uses the xyplot(), which requires the scale = list...

`plot(augPred(model2), scale = list(x = list(log = 10)), xlim = c(1,3000), xlab = "Price (resp/mg", ylab = "Consumption")