-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 box mark #3127
base: master
Are you sure you want to change the base?
Add box mark #3127
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #3127 +/- ##
========================================
Coverage 98.41% 98.42%
========================================
Files 76 76
Lines 24076 24190 +114
========================================
+ Hits 23695 23809 +114
Misses 381 381
|
Observable Plot does this with the regular bar mark, but they have That doesn't mean that Seaborn Objects should do the same, but it is interesting to see how other grammar of graphics libraries handle it. |
The main practical difference would be the loss of the range calculation when (
so.Plot(tips, "day", "total_bill", color="sex")
.add(so.Bar(), so.Perc([25, 75]), so.Dodge())
) I do wonder a little bit whether the One thing that would be a little awkward to do with this parameterization would be a candlestick chart when your data naturally has "open" and "close" columns. Having a so.Plot(["a", "b"], ymin=[1, 2], ymax=[2, -1]).add(so.Box()) |
This is a rectangular mark drawn between min/max values, sort of a cross between
Bar
andRange
:I think it's very likely that there will be a standalone mark for drawing a full box-and-whisker plot in one layer — name and implementation strategy TBD — but until then this mark provides what we need to have an (outlier-less) "box plot":
Couple notes:
Span
,Rect
,Plank
,Beam
,Lath
. The first two are more useful for other planned marks, and the latter 3 are not obvious. This does commit us to usingBoxplot
orWhiskerBox
or something like that for the proper "box plot" mark.Bar
andArea
marks use. I'm souring on this a bit and may revert it in a future release.