-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flip axes #135
Comments
This an an excellent idea for an enhancement. How would you expect this to be invoked? Would it be a new argument to the In the meantime a workaround which is not fully functional but always something: upset(
head(movies, 100),
genres,
encode=FALSE,
sort_intersections_by=c('degree', 'cardinality'),
matrix=intersection_matrix() + coord_flip(),
base_annotations=list(
'Size'=(
intersection_size(text=list(hjust=-0.2, vjust=0.5))
+ coord_flip()
+ theme(axis.text.y=element_blank())
)
),
set_sizes=FALSE
) + patchwork::plot_layout(design='BA', heights=c(1, 1), widths=c(1, 2)) Adding set sizes will require modifications because the |
Yes, I was imagining a new argument to the Thanks for the work around this looks similar a lot like what I had imagined! While I like the verbatim descriptions of the intersections as rows labels, I often work with more wordy categories, so I was imagining the categories as column headers of the intersection matrix (in 45 degree angle). Furthermore, I would prefer to have the "intersection" label below the bars (like the "group" label below the intersection matrix). Thanks so much for your responsiveness and willingness to implement new features. Greatly appreciated!! |
Thanks for the workaround! I would also find Januz's suggestion useful if implemented, but for my purposes it's easy enough to put in by hand. |
Thank you for the workaround. This is almost what I'm looking for. Would it be possible to add set labels (action, comedy, etc) at the bottom where the "group" label is? In similar way as they appear in normal upset plot? |
Is your feature request related to a problem? Please describe.
I was wondering whether it would be possible to flip the axes of the upset plot so that the intersection matrix's orientation would be vertical and the bars would be horizontal. Especially, when working with a lot of intersections, this would make the plot more easily readable in my opinion.
Describe the solution you'd like
Add a function argument to
upset()
that flips everything, ideally including additional plots, etc.Describe alternatives you've considered
I wondered whether one could manipulate the different plot elements
upset()
uses manually but wasn't successful.Context (required)
ComplexUpset version: 1.3.0
R version details
R session information
The text was updated successfully, but these errors were encountered: