-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve automatic bin determination for histograms via start, end, an…
…d step attributes (#285) * Merge upstream * Sync with master * Fix bin size variance from #217 * Format and test * Change labelOverlap to True Co-authored-by: Dominik Moritz <domoritz@gmail.com> * Modify markbar; currently questioning whether or not it's needed * Remove markbar enitrely, rely on Altair automatic bin detection https://altair-viz.github.io/user_guide/generated/core/altair.BinParams.html * Modify code snippet * Revert "Remove markbar enitrely, rely on Altair automatic bin detection https://altair-viz.github.io/user_guide/generated/core/altair.BinParams.html" This reverts commit 9cb9418. * Implement bin size estimation via Freedman Diaconis's Rule * Use numpy to compute IQR for better performance (pandas too slow) * Add tests * Add test cases for histogram binning * Address changes from @domoritz review (small optimizations) * Black and format * Move histogram bin width computation to pandas executor (execute_binning) * Center bars between ticks in distribution setting * Renaming in execute_binning * Bin width computed accurately in execute_binning; no need for get_bin_size() * Revert to Freedman rule; maintain correct ticks Co-authored-by: Micah Yong <micahyong@Micahs-MacBook-Pro.local> Co-authored-by: Dominik Moritz <domoritz@gmail.com>
- Loading branch information
1 parent
c49cbdb
commit 952b642
Showing
3 changed files
with
41 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters