GENERATE_CHART_IMAGE
Generates a beautiful, high-quality PNG chart (bar, line, scatter, pie, or heatmap) from a dataset using matplotlib and seaborn. Perfect for visual analysis. Saves the image to the specified path.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_path | string | yes | Absolute path to the dataset (CSV/Excel). |
output_path | string | yes | Absolute path to save the .png file (e.g., ~/Desktop/sales_chart.png). |
chart_type | bar | line | scatter | pie | heatmap | yes | Type of chart to generate. |
x_column | string | β | Column name to use for the X-axis (or labels for pie charts). Not needed for heatmap. |
y_column | string | β | Column name to use for the Y-axis (or values for pie charts). Not needed for heatmap. |
title | string | β | Title of the chart. |
color_theme | string | β | Optional seaborn palette name (e.g., 'viridis', 'magma', 'coolwarm', 'Blues', 'Set2'). |
How to use it
You normally trigger this by describing what you want in chat β the agent selects GENERATE_CHART_IMAGE automatically. For example:
Try saying
βuse analyst tools to generate β¦β
In a workflow
As a step in a multi-step workflow DAG:
json
{
"id": "s1",
"agent": "analyst_tools",
"action": "GENERATE_CHART_IMAGE",
"args": {
"input_path": "/Users/me/Documents/file.txt",
"output_path": "/Users/me/Documents/file.txt",
"chart_type": "bar"
},
"depends_on": [],
"outputs": []
}Direct call
For scripting, call it directly via POST /execute_tool. Every tool returns { success, message, data }.
bash
curl -X POST http://127.0.0.1:8000/execute_tool \
-H "Content-Type: application/json" \
-d '{"tool_name":"GENERATE_CHART_IMAGE","args":{"input_path":"/Users/me/Documents/file.txt","output_path":"/Users/me/Documents/file.txt","chart_type":"bar"}}'Part of the analyst_tools plugin. Browse the full Plugin & Tool Catalog or the relevant feature guide.