plot_from_result
Render a fitted result's diagnostic plot—event study, RD plot, synth gap, balance, or ROC—as a PNG, with optional restyling edits while data stays locked.
Instructions
Render a fitted result's diagnostic plot (event study, rdplot, synth gap, balance, ROC) as a PNG image block. Optional edits restyle it with the data locked.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"result_id": "<result_id>"
},
"name": "plot_from_result"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Override the auto-detected plot kind. Common values: 'event_study', 'rdplot', 'synth_gap', 'love_plot', 'coef_plot'. | |
| edits | No | sp.interactive actions; reply adds code. | |
| detail | No | Payload depth; agent is the fullest. | agent |
| data_id | No | Data handle (d_...) from load_data; replaces data_path. | |
| figsize | No | Width, height in inches (default [8,5]). | |
| data_csv | No | Small inline table as CSV text. | |
| as_handle | No | Cache the fit and return its result_id. | |
| data_path | No | Absolute path of a data file on the server. | |
| result_id | Yes | Handle to a fitted result. | |
| data_records | No | Small inline table as row objects. | |
| max_output_bytes | No | Result byte budget (default 262144; 0 = none). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||