Open stefaneng opened 1 year ago
I can confirm this. As a workaround you can use something like:
lattice::bwplot(y ~ x, data = simple.data, scales=list(y=list(labels=rep("", 5))))
But of course, that's not a fix of the inconsistent behavior.
Well, labels=NULL
is not documented to be a valid choice, so the behaviour is undefined. The reason for the inconsistency is that xyplot() and bwplot() have different "defaults" for scales
.
My suggestion would be to either use
scales=list(y=list(at = numeric(0)))
(documented, but no tick marks), or
default.scales = list(y=list(labels = NULL))
(technically undefined, but likely to work for the foreseeable future).
y-axis labels can be removed by setting
scales$y$labels = NULL
inlattice::xyplot
,lattice::histogram
, and others but it does nothing when usinglattice::bwplot
.Example:
Created on 2023-01-06 with reprex v2.0.2