Matplotlib js_html animation width limit

Hey, I stumbled upon this possibility to embed a matplotlib animation in streamlit: Matplotlib animation in Streamlit through HTML/JS

It works well so far, however increasing both the width or height argument in components only works up to a point. Increasing it further does not change the width or height of the animation. My code looks like this:

components.html(ani.to_jshtml(), height=1000)

Did anyone else encounter this?

Hi @FassbenderChristian

It could be a limit of the to_jshtml method, alternatively you could use the save method to export the animation as a video file and then use st.video to render it in app.

More info on save:

https://matplotlib.org/stable/api/_as_gen/matplotlib.animation.Animation.html#matplotlib.animation.Animation.save