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

feat: Adds show_set_totals argument to display set totals #48

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

dnldelarosa
Copy link
Collaborator

This pull request introduces a new feature to the ggvenn package, allowing users to display the total count and/or percentage for each set in the Venn diagram using the show_set_totals argument. This addresses the request in issue #28 for a more informative Venn diagram display.

Motivation:

Currently, ggvenn only displays the counts or percentages within the intersections of the Venn diagram. However, users may also want to see the total counts or percentages for each individual set, providing a more complete understanding of the data, as requested in issue #28.

Implementation:

The new show_set_totals argument accepts the following values:

  • "c": Show only the count for each set.
  • "p": Show only the percentage for each set.
  • "cp": Show both the count and percentage for each set.
  • "none": Hide the set totals (default).

This argument provides users with flexibility in choosing how to display set totals in their Venn diagrams.

Closes #28

This commit introduces a new argument, `show_set_totals`, to the `ggvenn` and `geom_venn` functions. This allows users to optionally display the total count and/or percentage for each set in the Venn diagram.

The `show_set_totals` argument accepts the following values:

* `"c"`: Show only the count for each set.
* `"p"`: Show only the percentage for each set.
* `"cp"`: Show both the count and percentage for each set.
* `"none"`: Hide the set totals (default).

This new feature provides users with more information about the composition of their Venn diagrams and enhances the overall clarity of the visualization.
@yanlinlin82 yanlinlin82 merged commit d866d13 into yanlinlin82:master Sep 15, 2024
0 of 5 checks passed
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

Successfully merging this pull request may close these issues.

Including total on the set labels
2 participants