gia*_*iac 3 3d r sequence histogram
所以我有一个5行20列的数据集.我试图hist3D从plot3D包中绘制一个.
dt = structure(c(1, 1, 1, 3, 1, 2, 1, 0, 2, 1, 2, 1, 0, 1, 1, 0, 1,
0, 2, 2, 1, 1, 1, 1, 4, 4, 1, 1, 2, 3, 8, 1, 1, 2, 1, 10, 0,
1, 2, 1, 9, 0, 2, 4, 0, 4, 0, 5, 2, 2, 2, 0, 1, 2, 4, 1, 1, 3,
2, 6, 8, 1, 2, 2, 4, 10, 0, 2, 2, 4, 7, 0, 7, 1, 4, 11, 0, 4,
1, 2, 15, 0, 4, 2, 3, 16, 2, 7, 2, 2, 18, 3, 9, 0, 1, 15, 0,
15, 0, 2), .Dim = c(5L, 20L), .Dimnames = list(c("f Housework",
"g Odd jobs", "h Eating", "i Child care", "j Care for others"
), c("V1", "V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9", "V10",
"V11", "V12", "V13", "V14", "V15", "V16", "V17", "V18", "V19",
"V20")))
Run Code Online (Sandbox Code Playgroud)
直方图
hist3D(x = 1:5, z = dt, scale = T, col = jet.col(100, alpha = 0.3), add = F, colkey = F, ticktype = "detailed")
Run Code Online (Sandbox Code Playgroud)

我想要的是
用x-axisrow.names("f Housework",
"g Odd jobs", "h Eating", "i Child care", "j Care for others"
)替换(1:5 )
我不希望每个x变量都有相同的颜色,而是我的数据行(1:5,"f Housework",
"g Odd jobs", "h Eating", "i Child care", "j Care for others"),我希望每行有不同的颜色(如果可能的话,可以使用不同的"热图"序列颜色).
我想要的是这样的(我知道的手绘):

有什么建议?
如果你还没有弄清楚(或者是下一个带有类似问题的人),这里有一篇很棒的博客文章,关于改变hist3D中的所有轴事项:http://entrenchant.blogspot.co .英国/ 2014_03_01_archive.html
| 归档时间: |
|
| 查看次数: |
3013 次 |
| 最近记录: |