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

Add parameter to allow formatting of labels of subset sizes #28

Merged
merged 1 commit into from
Jan 14, 2017

Conversation

burritothief
Copy link
Contributor

I'm using your library to compare sets with very large numbers (numbers are also dollar numbers) so I want the venn diagram to display as something nicer like $1.3MM instead of 1301304.

This pull request adds an additional argument to venn2 and venn3 that is a function that will take the subset size as a parameter and return a formatted string.

@konstantint
Copy link
Owner

Oh, I was delaying with this function because I was reluctant to decide whether I want to implement it as you did, via adding parameters, or make it part of the Venn class (e.g. v.format_subset_labels(f)).
The latter solution is structurally a bit nicer because allows to modify the diagram later and does not require to remember about the formatter parameter in, say, venn_unweighted functions. On the other hand, the former is more familiar.

Let's say your PR resolves the uncertainty now and we'll go with this option :)

@konstantint konstantint merged commit 5069caf into konstantint:master Jan 14, 2017
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.

None yet

2 participants