Below I've constructed an Upset plot. I'm using a palette of colors to define the bar colors. Is there a way to do this for the matrix of connected dots as well?
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"))
When attempting to apply the palette to the matrix, I get warnings and only the first color, red, is used.
upset(movies, main.bar.color=brewer.pal(2^ncol(movies)-1, "Set1"),
matrix.color=brewer.pal(2^ncol(movies)-1, "Set1"))
upset
allows to specify only one color formatrix.color
.A solution is to modify the
UpSetR:::Create_layout
function: