Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Display both absolute frequencies and percentages #89
Thanks for the pull request. @arosenfeld addressees the same issue in #77. Unfortunately I've not found the time and focus to touch that up and merge it. There were some tricky questions of consistency there. I would appreciate if you took a look at that pull request and compare how it handles this matter.
Thanks for the quick response. I have looked into issue #77 and I like the idea of adding a new parameter. I think show_counts and show_percents should not affect each other. What I mean is we can still keep the flexibility of the current show_counts implementation and display percentages on top of it.
import upsetplot example = upsetplot.generate_counts() plot(example, show_counts=False, show_percents=False)
Percentages can be displayed even with no counts:
plot(example, show_counts=False, show_percents=True)
When counts and percentages are displayed, percentages are in a new line below:
plot(example, show_counts=True, show_percents=True)
This strategy keeps the current formatting functionality of show_counts, with or without displaying percentages:
plot(example, show_counts='%.2f', show_percents=True)
The change only affects the label generation, adding the new parameter and doesn't break any existing implementation.