Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Rotating Movie

Export a 360-degree rotating movie of the supercell.

Requires ffmpeg on the system path.

cell.plot_structure(
    output='structure.mp4',
    fps=60,
    duration=6.0,
)

GIF fallback

Pure Python, no ffmpeg needed.

cell.plot_structure(
    output='structure.gif',
    fps=30,
    duration=4.0,
)

Full options

cell.plot_structure(
    output='structure.mp4',
    width=1024,
    height=1024,
    fps=60,
    duration=6.0,
    elevation=15.0,
    atom_size=10.0,
    colormap='Reds',
    background='white',
)
ParameterDefaultDescription
outputrequiredPath to .mp4 or .gif output.
width, height1024, 1024Pixel dimensions.
fps60Frames per second.
duration6.0Seconds (one full 360 rotation).
elevation15.0Camera elevation in degrees.
atom_size10.0Marker size for atoms.
colormap"Reds"Matplotlib colormap for depth-coloured bonds.
background"white"Figure background colour.