The following code using cloud
produces a plot with tick marks as expected:
require(lattice)
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris,
scales = list(arrows=F))
When the panel border thickness is changed using axis.line
within the par.setting
argument, the border thickness gets changed but the tick marks disappear, whether or not the tck
argument is invoked within scales
:
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris,
scales = list(arrows=F, tck=1),
par.settings = list(
axis.line = list(lwd = 0.5)))
This seems to happen with other 3d functions, such as wireframe
. Is there something I overlooked, and how could I fix this? Thank you very much for your help.
I think it's a bug in the code. If you change the distance argument to make tickmarks longer and then also try to make the ticks thicker, it results in a different line type rather than thicker ticks:
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris,
scales = list(arrows=F, distance=c(2), draw = TRUE),
par.settings = list(axis.line = list(lwd = 3)) # Dashed lines instead of thicker
)
So there seems to be some "cross talk" on the par-channels. Furthermore, if you use the lty
parameter, you get the desired changes in tick width:
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris,
scales = list(arrows=F, distance=c(2), draw = TRUE),
par.settings = list(axis.line = list(lty = 0.5)) # Success
)
I'm guessing this also affects the wireframe function, since they are at their core very similar, just with different panel functions. (This is on Mac's running R 2.15.3 and lattice 0.20-15 as well as in R 3.0.2 / lattice 0.20-24.)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句