You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally, the alignment of animations should be the same as when using to_html5_video() and the same as for normal plots.
In other words, the animations should be left-aligned.
If the previous behavior isn't supposed to be changed, it would be great to add an option that allows disabling the centered alignment.
Centering the animations makes them align differently than the regular
images in the notebook. Also, align attribute is somewhat deprecated.
This adjusts some of the styling as well so that the controls are
somewhat aligned with themselves.
Centering the animations makes them align differently than the regular
images in the notebook. Also, align attribute is somewhat deprecated.
This changes to use inline-block with a div to put the whole animation
at the left, and then center the controls within that block.
Centering the animations makes them align differently than the regular
images in the notebook. Also, align attribute is somewhat deprecated.
This changes to use inline-block with a div to put the whole animation
at the left, and then center the controls within that block.
I have asked this on the
matplotlib-users
mailing list (https://mail.python.org/pipermail/matplotlib-users/2018-July/001464.html) and I was encouraged to open an issue here.Bug report
Bug summary
Animations created with
to_jshtml()
are centered, and it is quite hard to un-center them.The culprit is this line:
matplotlib/lib/matplotlib/_animation_data.py
Line 151 in c552bdc
Code for reproduction
An example can be seen on this page: https://splines.readthedocs.io/en/latest/bezier.html
Actual outcome
The HTML+JS animations are centered.
Expected outcome
Ideally, the alignment of animations should be the same as when using
to_html5_video()
and the same as for normal plots.In other words, the animations should be left-aligned.
If the previous behavior isn't supposed to be changed, it would be great to add an option that allows disabling the centered alignment.
Another reason to remove the alignment: the "align" attribute of "div" elements is "obsolete" and "deprecated" according to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div
Matplotlib version
The text was updated successfully, but these errors were encountered: