-
Notifications
You must be signed in to change notification settings - Fork 251
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
Quantile bars #1521
Quantile bars #1521
Conversation
Two design issues here are:
layer(Stat.density(quantiles=[0.05, 0.95]), Geom.line, Geom.bar) won't work because both
Also (from point 1) your example can be tidied up using 2 geoms in the n = 400
group = repeat([-1, 1], inner=200)
x = randn(n) .+ group
plot(x=x, color=string.(group), Guide.colorkey(title="", pos=[3.5,0.7]),
layer(Stat.density, Geom.line, Geom.polygon(fill=true, preserve_order=true), alpha=[0.4]),
layer(Stat.quantile_bars(quantiles=[0.05, 0.95], bar_width=0.05), Geom.bar)
Guide.title("Density with bars showing the central 90% CI"),
Guide.ylabel("Density"), Coord.cartesian(xmin=-4, xmax=4)
) Note for polygons, |
Codecov Report
@@ Coverage Diff @@
## master #1521 +/- ##
==========================================
- Coverage 89.74% 89.72% -0.03%
==========================================
Files 39 39
Lines 4633 4672 +39
==========================================
+ Hits 4158 4192 +34
- Misses 475 480 +5
Continue to review full report at Codecov.
|
It seems that something upstream is broken. Probably, it is related to the new PooledArrays 1.2.0 release of 6 hours ago. |
Apart from that, thank you for the feedback @Mattriks! I have now implemented your comments. Let me know if you have more comments. |
Thanks to a PooledArrays update by Bogumił Kamiński, the tests passed again in |
@Mattriks Is there anything I can do to move this PR forwards? |
Be patient 😃 |
Friendly reminder. By the way, I understand that reviewing code takes time and is not the greatest job in the world, but it's also quite demotivating to see PRs being stalled. I have many ideas for, hopefully, good PRs for Gadfly. However, with each day of delay on the review, the new PRs become less important for me. |
Sorry for the delay! Super busy with other stuff, I will attempt to get back to this PR this week. More PRs for Gadfly are very welcome! To discuss your new PRs/ideas opening a new issue is good, or message me directly on Julia discourse! |
Okay 👍 👍 Thanks for letting me know! |
PR looks good! You should also add a test to |
Thanks! I've implemented your suggestions and also ran the regression tests. Of course, there isn't something to check against, but the image looks as expected: If this PR is merged, would it then also be possible to register a new version in the JuliaRegistries? That would be nice, because I then don't have to use Gadfly.jl#master in an upcoming paper of mine 😄 |
This adds a new statistic to Gadfly, namely for showing quantiles for distributions. In the docs, this currently looks as follows:
Stat.quantile_bars
Contributor checklist:
NEWS.md
squash
'ed orfixup
'ed junk commits with git-rebase