R lattice 3d plot: ticks disappear when changing panel border thickness

Lin Yangchen

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.

IRTFM

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] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

在R-Studio中使用Lattice panel.identify

来自分类Dev

R中带有plot3D或绘图的3D表面图

来自分类Dev

使用 R 中的 Plot3D 包增加 3D 曲面图厚度

来自分类Dev

Lattice grouped dot plot with conditional fill color

来自分类Dev

在R中使用Plot3D库中的Hist3D在R中创建3d直方图时,垃圾箱不与轴刻度对齐

来自分类Dev

Installing lattice in R: "Error : Invalid DESCRIPTION file"

来自分类Dev

Title on a multi-panel plot

来自分类Dev

Multiple 1D plots in a 3D plot

来自分类Dev

使用Lattice(panel.smoother)或ggplot提取方程式以获得最佳拟合

来自分类Dev

python中的3D绘图,x-ticks和标签之间的空间

来自分类Dev

Changing form button style without losing 3d effect

来自分类Dev

octave 3d plot with mesh out of experimental data

来自分类Dev

无法使用plot_ly创建3D曲面

来自分类Dev

快速使用Core Plot的3D PieChart

来自分类Dev

R Lattice就像使用Python,Pandas和Matplotlib的情节

来自分类Dev

所有组合的igraph graph.lattice(在R中)

来自分类Dev

R中的3D矩阵求和

来自分类Dev

R中的3D表面图

来自分类Dev

在R中绘制散点图3D

来自分类Dev

R中的3D矩阵求和

来自分类Dev

R 错误中的 3D 绘图

来自分类Dev

使用plot3D在R中的persp3d()中设置颜色范围

来自分类Dev

使用plot3D在R中的persp3d()中设置颜色范围

来自分类Dev

R: plot3D scatter3D,是否有 coord_fixed() 选项?

来自分类Dev

从plot3d图保存3D图形应用程序的文件

来自分类Dev

使用plot3d在单个绘图窗口中绘制多个3D图像

来自分类Dev

使用plot3d在单个绘图窗口中绘制多个3D图像

来自分类Dev

Plot2d切入3D功能

来自分类Dev

R 3D阵列到2D矩阵