8000 Un-align animations created with to_jshtml()? · Issue #11795 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Un-align animations created with to_jshtml()? #11795
Closed
@mgeier

Description

@mgeier

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:

<div class="animation" align="center">

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0