-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
plot_ppc animation: improve docs and error handling #1162
Conversation
arviz/plots/ppcplot.py
Outdated
"`animation_kwargs({'blit':False}) or changing the plotting backend (e.g. to TkAgg)" | ||
) | ||
if animated: | ||
if backend == "matplotlib": |
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.
This logic should be moved into the backends themselves, so the higher level plotting function can stay unopinionated .
Let me know if you want me to edit PR. Happy to do so if you like!
if animated and backend == "bokeh": | ||
raise TypeError("Animation option is only supported with matplotlib backend.") | ||
|
||
if animated and animation_kwargs["blit"] and platform.system() != "Linux": |
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.
Noticed this was already here before your PR. Tech debt I guess!
@@ -312,10 +339,6 @@ def plot_ppc( | |||
show=show, | |||
) | |||
|
|||
if backend is None: |
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 for moving this
I should note happy to get this merged to fix the animation issue and I can follow up to move the code to the appropriate backend. |
Codecov Report
@@ Coverage Diff @@
## master #1162 +/- ##
===========================================
+ Coverage 78.77% 93.10% +14.32%
===========================================
Files 94 94
Lines 9302 9312 +10
===========================================
+ Hits 7328 8670 +1342
+ Misses 1974 642 -1332
Continue to review full report at Codecov.
|
LGTM. Merging |
Following #1153 this PR adds a more detailed explanation of common problems and fixes arising when running animations. It will also raise a Warning when tryuing to render and animation inside a notebook without the