matplotlib 3.5.1

ParametersReturns
to_html5_video(self, embed_limit=None)

This saves the animation as an h264 video, encoded in base64 directly into the HTML5 video tag. This respects animation.writer and animation.bitrate . This also makes use of the interval to control the speed, and uses the repeat parameter to decide whether to loop.

Parameters

embed_limit : float, optional

Limit, in MB, of the returned animation. No animation is created if the limit is exceeded. Defaults to animation.embed_limit = 20.0.

Returns

str

An HTML5 video tag with the animation embedded as base64 encoded h264 video. If the embed_limit is exceeded, this returns the string "Video too large to embed."

Convert the animation to an HTML5 <video> tag.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/animation.py#1222
type: <class 'function'>
Commit: