我在R studio中使用“ pavo”包,使用“ tcsplot”函数创建四面体色彩空间图。我想问问我该怎么写才能在同一四面体色彩空间图中组合两个数据
tcsplot(data1,
size = 0.01,
alpha = 1,
col = "green",
vertexsize = 0.02,
achro = TRUE,
achrosize = 0.01,
achrocol = "grey",
lwd = 1,
lcol = "lightgrey",
new = FALSE,
hspin = FALSE,
vspin = FALSE,
floor = F,
grid = TRUE,
fill = TRUE
)
顺便问一下,如何输出这种绘图格式?
谢谢
答案 0 :(得分:0)
要将点添加到tcsplot()
生成的绘图中,可以使用tcspoints()
(类似于基数R plot()
和points()
函数):
library(pavo)
data(sicalis)
data(flowers)
vis_sicalis <- vismodel(sicalis)
vis_flowers <- vismodel(flowers)
tcs_sicalis <- colspace(vis_sicalis)
tcs_flowers <- colspace(vis_flowers)
tcsplot(tcs_sicalis, col = "green")
tcspoints(tcs_flowers, col = "red")