Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 R 中 lattice 库中的 parallelplot() 函数,我试图弄清楚如何将标签添加到左侧的 x 轴。
我的问题是这个函数的文档并没有真正告诉你怎么做?到目前为止,我所看到的是我能够创建图表然后手动修改轴。
有没有更好的办法?
上面是我的图表的图片,我正在尝试在 x 轴上自动添加组的名称。
标签基于列的名称,您可以随意设置。从您的输出来看,您似乎没有命名 data.frame 的列。
library(lattice) dat <- data.frame( One = rnorm(10), Two = rnorm(10, 2, 1), "Some name" = rnorm(10, 4, 0.1), check.names = FALSE #or you'll get periods instead of spaces ) parallelplot(~ dat, horizontal.axis = FALSE)