You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When passing custom labels to the matrix, they are overridden by those automatically generated by upset_data, effectively preventing the user to change the labels of the matrix plot.
Code to reproduce
# Load the example dataset as-is# Install ggplot2, ComplexUpset and ggplot2movies
library(ggplot2)
library(ComplexUpset)
movies<- as.data.frame(ggplot2movies::movies)
genres<- colnames(movies)[18:24]
movies[genres] <-movies[genres] ==1movies[movies$mpaa=='', 'mpaa'] <-NAmovies<- na.omit(movies)
# Plot without any modifications ("Plot 1")
upset(movies, genres, name='genre', width_ratio=0.1)
# Override the "labels" in the y axis of the matrix plot ("Plot 2"):
upset(
movies, genres, name='genre', width_ratio=0.1,
matrix= (
intersection_matrix() +
scale_y_discrete(
labels= tolower(genres)
)
)
)
# Other modifications work as expected (and documented, "Plot 3"):
upset(
movies, genres, name='genre', width_ratio=0.1,
matrix= (
intersection_matrix() +
scale_y_discrete(
labels= tolower(genres),
position="right"
)
)
)
Expected behavior
I expect to be able to change the labels assigned to the matrix plot, overriding those provided by upset_data. See the attached "Plot expected" image.
Describe the bug
When passing custom labels to the matrix, they are overridden by those automatically generated by
upset_data
, effectively preventing the user to change the labels of the matrix plot.Code to reproduce
Expected behavior
I expect to be able to change the labels assigned to the matrix plot, overriding those provided by
upset_data
. See the attached "Plot expected" image.Screenshots
Plot 1
Plot 2
Plot 3
Plot Expected
Context (required)
ComplexUpset version: 1.3.3
R version details
R session information
The text was updated successfully, but these errors were encountered: