yanlinlin82 / ggvenn

Venn Diagram by ggplot2, with really easy-to-use API.
Other
167 stars 25 forks source link

Feature: Introduce `show_stats` argument for enhanced control over displayed statistics #46

Closed dnldelarosa closed 2 months ago

dnldelarosa commented 2 months ago

This pull request introduces the new show_stats argument to the ggvenn function, providing users with more granular control over the statistics displayed within Venn diagrams. This addresses several open issues and offers a more versatile and intuitive approach compared to the deprecated show_percentage argument.

Users can now choose to display either the count (c), percentage (p), or both (cp) for each set in the Venn diagram. This allows for greater customization and tailoring of the output to specific needs.

Example usage:

# Show only counts
ggvenn(data, show_stats = "c")

# Show only percentages
ggvenn(data, show_stats = "p")

# Show both counts and percentages
ggvenn(data, show_stats = "cp")  # Default behavior

Related issues: #5, #26, #29, PR #45 (Addresses the scales warning - see below)

Note on scales warning:

This pull request does not directly address the scales warning mentioned in PR #45.

In summary, this pull request introduces a significant improvement to the ggvenn package by providing a more flexible and user-friendly way to control the display of statistics within Venn diagrams. It resolves existing issues, enhances clarity, and paves the way for future enhancements.

Thank you for considering this contribution!