API Reference
yaml2plot 2.0.1 exposes a streamlined, function-oriented public API built around three explicit steps:
Data Loading – Load raw SPICE data into Python with
yaml2plot.load_spice_raw()or letyaml2plot.plot()load it lazily from a file path.Configuration – Describe what you want to plot using
yaml2plot.PlotSpec(YAML, file, or dictionary input).Plotting – Call
yaml2plot.plot()to generate an interactive Plotly figure.
This page documents each public symbol in the order you will use them.
Coordinate Inference (load_spice_raw)
When building an xarray.Dataset from a SPICE .raw file, coordinate selection is deterministic:
Use
timeif present.Otherwise use
frequencyif present.Otherwise use the first signal as a fallback coordinate (dimension name
axis).
Warnings:
If both
timeandfrequencyare present,timeis chosen and aUserWarningis emitted.If neither canonical coordinate exists, the first-signal fallback is used and a
UserWarningis emitted.
Main API Symbols
|
Create Plotly figure from data and PlotSpec configuration. |
|
Load one SPICE .raw file and return an xarray Dataset. |
|
Load many .raw files, preserving the order, and return a list of xarray Datasets. |
|
Load one CSV file and return a pandas DataFrame. |
|
Load many CSV files and return a list of pandas DataFrames. |
|
Pydantic-based plot specification with fluent API. |
|
A dataset container for SPICE simulation data with optional metadata. |