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

Fix bars in distribution plot #35

Merged
merged 2 commits into from
Nov 16, 2021
Merged

Fix bars in distribution plot #35

merged 2 commits into from
Nov 16, 2021

Conversation

frankenjoe
Copy link
Collaborator

@frankenjoe frankenjoe commented Nov 16, 2021

Closes #34

image

This fixes the problem of inconsistent bars, but has the downside that we replace the frequency count with density. So maybe we should add an option to switch between the two solutions?

@codecov
Copy link

codecov bot commented Nov 16, 2021

Codecov Report

Merging #35 (8ba84d2) into master (c30e449) will not change coverage.
The diff coverage is 100.0%.

Impacted Files Coverage Δ
audplot/core/api.py 100.0% <100.0%> (ø)

@hagenw
Copy link
Member

hagenw commented Nov 16, 2021

If you would like to have an option to switch what to show on the y-axis, I see two options:

Use frequency as the other option instead of count as this has not the problems you have shown in #34 (comment)

frequency

Another solution would be to provide the count option, but also disable the common_bins and kde_kws settings then (basically use what we had before this pull request for this option).

But I would also not over complicate it here and would prefer to have just one option. count is anyway not absolute as it depends on the bin width. density is easy to interpret, but you cannot easily see if one database has more samples than another. frequency is not so easy to understand, but you can see differences between the actual number of samples in the database.

So, I think I would stay with density or maybe go with frequency.

@frankenjoe
Copy link
Collaborator Author

So, I think I would stay with density or maybe go with frequency.

I have no strong opinion, what is your preference?

@hagenw
Copy link
Member

hagenw commented Nov 16, 2021

I think frequency shows slightly more information, so maybe we switch to frequency.

@frankenjoe
Copy link
Collaborator Author

I think frequency shows slightly more information, so maybe we switch to frequency.

done

@hagenw hagenw merged commit e044e2b into master Nov 16, 2021
@hagenw hagenw deleted the fix-distribution-bars branch November 16, 2021 11:08
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.

Bars in distrubtion plot not consistent
2 participants