-
-
Notifications
You must be signed in to change notification settings - Fork 396
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 examples to customize 2D KDE #1158
Conversation
LGTM, and I completely agree with the |
Codecov Report
@@ Coverage Diff @@
## master #1158 +/- ##
==========================================
- Coverage 93.12% 93.11% -0.02%
==========================================
Files 94 94
Lines 9286 9289 +3
==========================================
+ Hits 8648 8649 +1
- Misses 638 640 +2
Continue to review full report at Codecov.
|
See my feature request #1159 -- we should show usage of the |
Two of the new examples show how to pass a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest we briefly explain what the contour_kwargs
and contourf_kwargs
are for.
I.e., add to the docstring:
"Contour keyword arguments control the formatting of the contour lines." and "Contourf keyword arguments control the filling of contours."
In general -- and I don't think this is ArviZ's fault -- use of these keyword arguments requires a lot of understanding of the underlying implementation. This would be OK if we could leave it to Arviz to choose defaults and be happy with the results, but it seems like we still need a bunch of user input.
Maybe this could be fixed by choosing a good default colormap for the users, so that at least they don't have to understand, instead of leaving it unpredictably to the state of the environment?
We should probably extend ArviZ native style like
Would the first situation (which is basically the current one) work for your use case if styles were to guarantee reproducibility of results? I hope outlining the alternatives helps in understanding why plots behave like they do. |
Using styles you can also do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think that will be helpful.
Thanks @rpgoldman for bringing up the issue. |
* added groups * update tests and changelog * lint changes * update from_dict and tests * update changelog * modify io_dict * minor fixes * update changelog again Add warning for log scale default in compare/loo/waic functions (arviz-devs#1150) * Added scale warning to ELPDData * Added scale warning to compare function * Added changes to Changelog * Moved warning to end of string in loo function * Removed last test for loo_print * Ran Black * Integrated Oriol's comments add local to docstring, and use lowercase for ess (arviz-devs#1152) hardcode show=False in plot_posterior subplots (arviz-devs#1151) * hardcode show=False in plot_posterior subplots * update changelog Fix documentation and deprecation warning in pair plot (arviz-devs#1156) The "kind" argument is not described correctly. * Fix pairplot warning. Previously, because of incorrect argument checking, pairplot would mistakenly warn the caller not to use the "contour" argument when that argument was NOT supplied. Changed default value to None and did the defaulting by hand to fix this issue. Also added some type declarations. * Clarified docstring for contour argument. Co-authored-by: Robert P. Goldman <[email protected]> add viridis as default cmap (arviz-devs#1160) add examples to customize 2D KDE (arviz-devs#1158) * add examples to customize 2D KDE * blackify gallery example * update changelog * briefly explain contour_kwargs and contourf_kwargs
Following #1157 this add examples to the docstring of
plot_kde
and a new example to the gallery.This also sets
fill_last=False
as the default, because nobody likes the previous setting :-)