-
Notifications
You must be signed in to change notification settings - Fork 94
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 KDE functionality to hist and hist2d plots #33
Comments
It's a very nice feature! I can hardly wait! |
I made some custom KDE graphs for a publication recently: These type of graphs are called 'raincloudplots': https://wellcomeopenresearch.org/articles/4-63 (which has a python implementation but is based on seaborn and therefore has the same problems) Feel free to use the code in I'll try to provide some feedback to proplot if that helps you. |
Thanks for the code! This is a good base for adding KDE functionality -- I probably won't have time to work on this until later this year but happy to accept PRs if you feel inclined/want it sooner. Proplot's source code recently underwent some major improvements so it should be much easier to contribute. We probably want to add the following:
And glad you find proplot useful :) it's already published on Zenodo but that probably wasn't clear -- there was just a Zenodo badge to the github home page. I've now added a link to the readthedocs homepage. |
I'd like to add KDE (kernel density estimation) functionality for the 1D and 2D histogram plotting functions,
hist
,hist2d
, and maybehexbin
. Users can then optionally add marginal distribution panels withpanel_axes
.Currently, the only matplotlib plotting function supporting KDE estimation is
violinplot
, but the result is often gross -- the "violins" do not smoothly taper to zero-width tails like in seaborn. Instead they abruptly cut off at the distribution minimum/maximum. So, we shouldn't try to use the existing KDE engine -- we should implement a new KDE estimation engine, similar to seaborn, and use it to powerhist
,hist2d
, andviolinplot
. This may involve writing a newviolinplot
from scratch.The text was updated successfully, but these errors were encountered: