plot_expression
Plot a mathematical expression over a specified variable and range, returning the rendered result as a PNG or SVG image.
Instructions
Plot an expression and return it as a rendered image (PNG or SVG)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session | No | Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'. | default |
| variable | No | Plot variable | x |
| range_max | No | Upper bound of plot range | |
| range_min | No | Lower bound of plot range | |
| expression | Yes | Expression to plot | |
| image_format | No | Image format to return: 'png' (raster) or 'svg' (vector, smaller) | png |