Data Visualization
Generate customizable scatter plots with regression lines and multiple data series
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/api/tools/scatter-plot-generator' \
-H 'Content-Type: application/json' \
-d '{"chartData":"Single series JSON:\n[{"x": 1, "y": 2}, {"x": 3, "y": 4}]\n\nMulti-series JSON:\n{\n "series": [\n {"name": "Group A", "data": [{"x": 1, "y": 2}]},\n {"name": "Group B", "data": [{"x": 2, "y": 3}]}\n ]\n}\n\nor text:\n1,2\n3,4\n5,6","chartTitle":"Enter chart title...","pointColors":"#3b82f6,#ef4444,#10b981","backgroundColor":"#ffffff","gridColor":"#e0e0e0","pointSize":"5","opacity":"0.8","chartHeight":"400","xMinValue":0,"xMaxValue":0,"yMinValue":0,"yMaxValue":0,"xAxisLabel":"X Values","yAxisLabel":"Y Values","showGrid":true,"showPoints":true,"showLabels":false,"showRegression":false,"showLegend":true}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/scatter-plot-generator| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| chartData | textarea | Sí | Data for the scatter plot. Supports single/multi-series JSON or simple x,y pairs |
| chartTitle | text | No | Title that will be displayed above the chart |
| pointColors | text | No | Colors for multiple series (comma-separated hex colors). Leave empty for default colors. |
| backgroundColor | color | No | Background color for the chart container |
| gridColor | color | No | Color for the grid lines |
| pointSize | number | No | Size of data points in pixels |
| opacity | number | No | Opacity of data points (0.1 to 1.0) |
| chartHeight | number | No | Height of the chart in pixels |
| xMinValue | number | No | Minimum value for X-axis (leave empty for auto-scale) |
| xMaxValue | number | No | Maximum value for X-axis (leave empty for auto-scale) |
| yMinValue | number | No | Minimum value for Y-axis (leave empty for auto-scale) |
| yMaxValue | number | No | Maximum value for Y-axis (leave empty for auto-scale) |
| xAxisLabel | text | No | Label for the X-axis |
| yAxisLabel | text | No | Label for the Y-axis |
| showGrid | checkbox | No | Display grid lines for better readability |
| showPoints | checkbox | No | Display data points (disable to show only regression lines) |
| showLabels | checkbox | No | Display labels on data points |
| showRegression | checkbox | No | Display linear regression lines for each series |
| showLegend | checkbox | No | Display a legend with all series |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-scatter-plot-generator": {
"name": "scatter-plot-generator",
"description": "Generate customizable scatter plots with regression lines and multiple data series",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=scatter-plot-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "scatter-plot-generator",
"arguments": {
"chartData": "Single series JSON:\n[{"x": 1, "y": 2}, {"x": 3, "y": 4}]\n\nMulti-series JSON:\n{\n "series": [\n {"name": "Group A", "data": [{"x": 1, "y": 2}]},\n {"name": "Group B", "data": [{"x": 2, "y": 3}]}\n ]\n}\n\nor text:\n1,2\n3,4\n5,6",
"chartTitle": "Enter chart title...",
"pointColors": "#3b82f6,#ef4444,#10b981",
"backgroundColor": "#ffffff",
"gridColor": "#e0e0e0",
"pointSize": "5",
"opacity": "0.8",
"chartHeight": "400",
"xMinValue": 0,
"xMaxValue": 0,
"yMinValue": 0,
"yMaxValue": 0,
"xAxisLabel": "X Values",
"yAxisLabel": "Y Values",
"showGrid": true,
"showPoints": true,
"showLabels": false,
"showRegression": false,
"showLegend": true
}
}
}¿Dudas o problemas? Contacta con [email protected]