-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
rcParams restrictions on frame_formats are out of sync with supported values (HTMLWriter) #17908
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
Comments
…y animation writers
Thanks for opening the PR against the rcparams. Would it be feasible/make sense to add it as a keyword argument to MovieWriter (and therefore it's subclasses)? |
I don't see why not. However, looking at the code for this, I think there might be a bigger family of changes to be made to expose writer behavior through the |
To follow up on this, the current call to matplotlib/lib/matplotlib/animation.py Lines 1359 to 1361 in 6b2cecc
but there are several more parameters that it could set: matplotlib/lib/matplotlib/animation.py Lines 796 to 798 in 6b2cecc
So we could thread through the |
Bug report
jshtml animation uses
HTMLWriter
to render animation frames. Digging into the code for this, we see that HTMLWriter listssupported_formats
:matplotlib/lib/matplotlib/animation.py
Line 785 in c54a5a9
However, there is no way to make use of this. The
to_jshtml
method of animation does not provide an interface to specify the frame format, so it must be pulled fromrcParams
.rcParams
, in turn, does not allowsvg
as an option.Code for reproduction
Actual outcome
Expected outcome
rcParams should allow setting frame formats that are supported by any animation writer, not just the ones supported by all.
Aside:
rcParams
allowsraw
but HTMLWriter doesn't. So there's already precedent.Matplotlib version
print(matplotlib.get_backend())
): Qt5Agg (but irrelevant to this issue)conda (main anaconda)
The text was updated successfully, but these errors were encountered: