API Reference

yaml2plot 2.0.0 exposes a streamlined, function-oriented public API built around three explicit steps:

  1. Data Loading – Load raw SPICE data into Python with yaml2plot.load_spice_raw() or let yaml2plot.plot() load it lazily from a file path.

  2. Configuration – Describe what you want to plot using yaml2plot.PlotSpec (YAML, file, or dictionary input).

  3. Plotting – Call yaml2plot.plot() to generate an interactive Plotly figure.

This page documents each public symbol in the order you will use them.

Main API Symbols

plot(data, spec, *[, show])

Create Plotly figure from data and PlotSpec configuration.

load_spice_raw(raw_file)

Load one SPICE .raw file and return an xarray Dataset.

PlotSpec(**data)

Pydantic-based plot specification with fluent API.

WaveDataset(raw_data[, metadata])

A dataset container for SPICE simulation data with optional metadata.