complex-upset icon indicating copy to clipboard operation
complex-upset copied to clipboard

Cannot set custom y-label in 'inclusive_intersection' mode

Open sharathkmenon opened this issue 3 years ago • 2 comments

Referring to the solution you provided in Issue #30 I've attached an example below, where I try setting the y axis label to "Test size", but the label name stays unchanged.

test <- data.frame(matrix(data = TRUE, nrow=10, ncol=4))
temp <- colnames(test)
test[10,1] = FALSE
test[9,2] = FALSE

upset(test, temp, mode = "inclusive_intersection", base_annotations = list("Test size" = intersection_size(mode='inclusive_intersection')))

test

sharathkmenon avatar May 05 '21 12:05 sharathkmenon

Thank you for highlighting this issue. Indeed, when adding the mode argument I also added code that overwrites the y axis label to make sure that users are aware of the mode in use. It must have caused this bug. However, it is still possible to overwrite the y axis label using ylab:

upset(
  test,
  temp,
  mode = "inclusive_intersection",
  base_annotations = list(
    "Test size" = intersection_size(mode='inclusive_intersection') + ylab("Test size")
  )
)

Would this workaround be good enough for you for now?

krassowski avatar May 05 '21 12:05 krassowski

Ah yes this works absolutely fine

Thank you!

sharathkmenon avatar May 05 '21 13:05 sharathkmenon