Reputation: 5169
I have the following code:
library(UpSetR)
listInput <- list(one = c(1, 2, 3, 5, 7, 8, 11, 12, 13),
two = c(1, 2, 4, 5, 10),
three = c(1, 5, 6, 7, 8, 9, 10, 12, 13))
upset(fromList(listInput))
which produces this plot:
As you can see currently the barplot on the left is ordered according to size.
I'd like to order it from top to bottom as: three, two, one
.
How can I achieve that?
Upvotes: 1
Views: 3818
Reputation: 1
To keep both parts of the plot in your pre-defined order, you also want to use the order.by = "degree"
option.
upset(fromList(listInput[c(1,2,3)]),
keep.order = T, order.by = "degree",
sets = c("one", "two", "three"))
Upvotes: 0
Reputation: 2056
You can manually order the sets by inputting them manually to set
and setting keep.order=TRUE
upset(fromList(listInput[c(1,2,3)]),
keep.order = T,
sets = c("one", "two", "three"))
Upvotes: 2