4
下面我構建了一個Upset plot。我使用調色板來定義條形顏色。有沒有辦法做到這一點連接點的矩陣呢?在UpSetR中爲矩陣點使用調色板
library(dplyr)
library(RColorBrewer)
library(UpSetR)
movies <- read.csv(system.file("extdata", "movies.csv",
package = "UpSetR"), header=T, sep=";")
movies <- select(movies, Action:Children)
upset(movies, main.bar.color=brewer.pal(2^ncol(movies)-1, "Set1"))
當試圖調色板適用於矩陣,我得到警告,只有第一個顏色,紅色,被使用。
upset(movies, main.bar.color=brewer.pal(2^ncol(movies)-1, "Set1"),
matrix.color=brewer.pal(2^ncol(movies)-1, "Set1"))