Plot Panels
plot_panelsDraws 2–6 vertically stacked panels that share one x-axis, such as Bode magnitude and phase, as deterministic SVG, PNG, and JSON outputs.
Instructions
Draw 2-6 vertically stacked panels that share one x axis (Bode magnitude + phase, waveform + spectrum, S-N curve + residual) as one deterministic SVG plus, by default, plot.png, a 1600 px wide picture (format=both; data.png_path; needs the png extra) that also comes back as an image in the reply (inline_image): hand over the PNG, not the SVG path; plus plot_data.json. 'panels' lists 'title|y_columns|y_label|y_scale' records; each panel gets its own y axis. Data: a CSV with a header row or inline JSON series; the same kinds, themes and decimation as plot_xy.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "plot_panels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | No | true draws grid lines at the major ticks of every panel; false draws none. | |
| kind | No | line, scatter, step or stem for every panel; default line. | line |
| theme | No | auto (follows light/dark), light, dark, or print (black and grey with dash patterns). | auto |
| title | No | Title above all panels, plain text <= 120 characters, e.g. 'Butterworth low pass'; blank = none. | |
| width | No | SVG width in px, 200..2400, e.g. 900. | |
| format | No | Picture file: both (default: plot.svg + plot.png 1600 px wide; PNG needs the png extra), svg (no PNG) or png (no SVG). | both |
| height | No | SVG height in px, 200..2400, e.g. 700; split equally between the panels. | |
| legend | No | auto (panels with 2+ series), off, top_right, top_left, bottom_right, bottom_left or right (outside). | auto |
| panels | No | 2..6 records 'title|y_columns|y_label|y_scale' joined by ';', e.g. 'Gain|magnitude_db|dB|linear;Phase|phase_deg|deg'. | |
| series | No | Inline JSON series [{"name":"mag","x":[...],"y":[...]}]; panels pick them by name; <=20 series, <=200000 points. | |
| markers | No | true adds a marker on every drawn point of line/step series in all panels. | |
| x_label | No | Title of the shared x axis with its unit, e.g. 'Frequency (Hz)'; plain text <= 120 characters. | |
| x_range | No | Fixed shared x range 'min,max': plain numbers in the axis unit, no unit text, e.g. '10,4000' (not '10 Hz,4 kHz'); blank = automatic. | |
| x_scale | No | linear or log for the shared x axis; log refuses zero or negative x (e.g. a 0 Hz row). | linear |
| x_column | No | CSV header name of the shared x column, e.g. 'frequency_hz'; blank = the first column. CSV mode only. | |
| data_file | No | CSV/TXT path with a header row, e.g. ws/<job>/filter_response.csv from dsp_filter_design. Give this or 'series'. | |
| inline_image | No | true (default): the PNG also comes back as an image block in the reply when it is <= 600 kB; false: path only. | |
| unwrap_phase | No | true unwraps every series whose name contains 'phase' (degrees; 'rad' in the name: radians): no +-180 jumps in a Bode phase. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Non-quantity payload (reports, listings) | |
| error | No | ||
| value | No | Primary quantity result | |
| values | No | All named quantity results (includes the primary) | |
| warnings | No | ||
| artifacts | No | ||
| provenance | Yes | What produced the result and from which inputs. | |
| review_status | No | unreviewed |