Plot Expression
plot_expressionPlot any mathematical expression and get a rendered PNG or SVG image. Specify the variable and plot range to visualize functions clearly.
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 |