Skip to content

plot_animation_plotly

Render an animated Plotly figure that plays through ctx.spectra.

Category Visualisation
Backend plotly - renders figures with plotly (optional extra viz)
Version 1.0.0
Reads ctx.spectra (a list of Spectrum1D)
Writes figures.animation

Parameters

Parameter Default Required Description
title 'stacked spectra — animation' - Figure title.
frame_duration_ms 600 - Milliseconds each frame is displayed.

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("plot_animation_plotly", ctx, {
    "title": "stacked spectra \u2014 animation",
    "frame_duration_ms": 600
})

The CLI loads a single 1-D spectrum with --input; this algorithm needs ctx.spectra (a list of Spectrum1D). Run it from Python or as a step of a pipeline preset.

{
  "tool": "plot_animation_plotly",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "title": "stacked spectra \u2014 animation",
      "frame_duration_ms": 600
    }
  }
}

Every algorithm is an MCP tool of the same name; describe_algorithm returns this page's metadata as JSON.

References

  • Plotly — https://plotly.com/python/animations/