-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fill specific points #5
Comments
Hi Dylan, The problem is that I didn't yet come up with a good user interface to specify such styling. Simply using a vector of colors feels "untidy" to me. But I realize that this might be a useful feature, so if you (or anyone else who reads this) has suggestions how to implement this, I would be happy to hear them. Best, Constantin |
@const-ae I just added highlights to ComplexUpset. The end result allows for things like this: And the user-interface for the above plot is: queries=list(
upset_query(
intersect=c('Drama', 'Comedy'),
color='red',
fill='red',
only_components=c('intersections_matrix', 'Intersection size')
),
upset_query(
set='Drama',
fill='blue'
),
upset_query(
intersect=c('Romance', 'Comedy'),
fill='yellow',
only_components=c('Length')
)
) More description is at the very end of the examples notebook. I was aiming to make my interface similar to what UpSetR does, but improve some aspects as well. It is a bit hacky but works well for me. The relevant commits are here and here. Feel free to take inspiration from my implementation - hope it will benefit your package too! |
Hi Constantin, Is there any update on this? I was wondering if I could "hack" the make_combination_matrix_plot() function as you mentioned and include a custom color vector to change specific point colors. I assume I could introduce the vector at the lines.
Would changing the "TRUE" to a vector cycle through the vector values for each point? |
Hi eggrandio, sorry no update on this. I think the best way to achieve this is still to fork the package and modify the Maybe something along the lines of
Best, |
Hi!
Thanks for this great package. Is it possible to use theme_combmatrix to fill different points with different colors? I currently can only figure out how to change all points to a single color.
I have tried giving multiple colors here but it doesnt seem to work:
ggplot(resglia, aes(x=Celltype)) + geom_bar(fill=c(rep("black",5),"red", rep("black",4))) + theme_pubr() + scale_x_upset(n_intersections = 10) + theme_combmatrix( combmatrix.panel.point.color.fill = c(rep("black",5),"red", rep("black",4)))
Thanks,
Dylan
The text was updated successfully, but these errors were encountered: