R Studio“ pavo”软件包:我可以使用“ tcsplot”函数在同一四面体色彩空间中绘制两个数据吗?

时间:2018-12-06 15:46:27

标签: r

我在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
)

enter image description here

顺便问一下,如何输出这种绘图格式?

谢谢

1 个答案:

答案 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")