Skip to content
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

include_empty_subsets shows uninformative set at left of plot #222

Closed
marykthompson opened this issue Jun 22, 2023 · 2 comments
Closed

include_empty_subsets shows uninformative set at left of plot #222

marykthompson opened this issue Jun 22, 2023 · 2 comments

Comments

@marykthompson
Copy link

Hi, these are great plots, thanks! I was wondering if you could clarify for me if this is the expected behavior and if there's any way around it.

I really like the include_empty_subsets option as whenever I've shown someone an upset plot, they are always confused if they aren't shown. However, when I used this option in UpSetPlot, I get a category with 0 elements on the left of the plot that is basically saying that there are no elements which are not assigned to any of the categories. This is obvious, and I think it would be better left out of the plot.

For example:
activities = from_contents({'Sun': ['sleep', 'TV', 'eat'], 'Mon': ['work', 'eat'], 'Tues':['work', 'gym']})
UpSet(activities, include_empty_subsets=True, show_counts=True).plot(fig=fig)

You can see that the plot is showing that there are no activities which are not on any of the days. I would prefer to exclude that column, which is not informative, but keep the actual 0 count empty subsets to the right, which are informative.

uninformative_subset

@jnothman
Copy link
Owner

Try using min_degree=1!

@marykthompson
Copy link
Author

OK, thanks! Sorry I failed to find this in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants