Closed dschlaep closed 4 years ago
Thanks for letting me know! This is fixed now.
FYI, my original motivation for using xlim
in setting up x was to avoid unnecessary calculations that aren't going to end up plotted anyway, but as you show, this is pretty fragile and prone to interact badly with other options.
visreg:::setupV
deals with anxlim
argument (on the predictor-scale) and creates a correctv
object. However,visreg
passes this samexlim
argument toplot.visreg
which is then overriding the internally correctly calculated values byvisreg:::visregPlot
,visreg:::visregOverlayPlot
, etc. from the data withif (is.factor(xx)) c(0, 1) else range(xx)
.I see a few options to handle this issue (and I am sure there are others):
xlim
from...
before passing toplot.visreg
(the plotting functions calculatexlim
internally correctly from the transformed x values)xtrans
(if present) toxlim
before passing toplot.visreg
Many thanks for this great package!