UpSetR - How to improve number rotation and change color?
09:56 24 Mar 2026

I'm using UpSetR package for R. I'm working with a very large datasets, and numbers are 6 digits long. It makes it very hard to read the numbers.

I'd like to rotate the numbers and make them start out at the top of the bar, but when I rotate them by 45 or 90 degrees, they overlap with the bar.

I'd also like to make the numbers a different color from the bars, but number.colors doesn't work, and main.bar.color also changes the number color.

Here's a reproducible example


df <- data.frame(name=c(1:100000),
                 food=rep(1, 100000),
                 drink=c(rep(1, 50000),(rep(0, 50000))),
                 house=c(rep(1, 30000),(rep(0, 70000)))
                 )

upset(df,sets = c('food','drink','house'),
 #number.colors= "red", # doesn't work uncommented
 main.bar.color = "blue", # changes bars and numbers
 show.numbers = "yes", # yes or no
 number.angles = 45,
text.scale = c(1, 1, 1, 1, 1, 2) # sixth parameter is numbers above bars
)

Is there a solution using the UpSetR package?

I've tried ComplexUpset for a bit and couldn't use it, but maybe I just need to try again.

r upsetr upsetplot