-
-
Notifications
You must be signed in to change notification settings - Fork 11
Add function for plotting reference bands #258
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #258 +/- ##
==========================================
+ Coverage 72.44% 73.04% +0.60%
==========================================
Files 42 43 +1
Lines 4921 5020 +99
==========================================
+ Hits 3565 3667 +102
+ Misses 1356 1353 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
I think we could also add the add_xyz
functions to be considered functions worthy of the minigallery. If you are interested in playing with this on the gallery_generator let me know and I can help, otherwise we'll open an issue to handle it later on.
Hmm... |
src/arviz_plots/plots/utils.py
Outdated
Dimensions to reduce unless mapped to an aesthetic. | ||
Defaults to ``rcParams["data.sample_dims"]`` | ||
ref_dim : list, optional | ||
Specifies the name of the reference dimension for reference values. |
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.
I would also update this to match the behaviour of this function.
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.
Done
src/arviz_plots/plots/utils.py
Outdated
) | ||
|
||
requested_aes = set(aes_map["ref_band"]).difference(plot_collection.aes_set) | ||
*ref_dim, _band_dim = ref_dim |
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.
Not sure why pylint is not complaining, maybe the leading underscore. But I think we should do one of the following.
- use
*ref_dim, _
to not store the last dimension as anything - use
*ref_dim, band_dim
and then check thatband_dim
has length 2 and raise an informative error otherwise (as I think the visual would break or behave weirdly in such case).
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.
Have added a check for this
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.
ready to merge once the docstring is fixed
Initial draft for plotting reference bands
Closes #227
📚 Documentation preview 📚: https://arviz-plots--258.org.readthedocs.build/en/258/