Skip to content

plot_overlay_plotly

Render every spectrum in ctx.spectra overlaid on one Plotly figure.

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

Parameters

Parameter Default Required Description
title 'spectra overlay' - Figure title.

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("plot_overlay_plotly", ctx, {
    "title": "spectra overlay"
})

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_overlay_plotly",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "title": "spectra overlay"
    }
  }
}

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

References

  • Plotly — open-source graphing library, https://plotly.com/python/