Elysia Tools Docs
ZH
语言
ZHESPTRUFRDEEN
返回主站
浏览工具

Data Visualization

矩阵图生成器

生成相关性和对比矩阵图,支持颜色强度映射和网格布局

html· HTML 结果打开工具

快速开始

用三种语言从你的代码中调用此工具。

cURL
curl -X POST 'https://api.elysiatools.com/zh/api/tools/matrix-chart-generator' \
  -H 'Content-Type: application/json' \
  -d '{"matrixData":"JSON format:\n[\n  [1, 0.8, 0.3, 0.5],\n  [0.8, 1, 0.6, 0.4],\n  [0.3, 0.6, 1, 0.7],\n  [0.5, 0.4, 0.7, 1]\n]\n\nor CSV format:\n1,0.8,0.3,0.5\n0.8,1,0.6,0.4\n0.3,0.6,1,0.7\n0.5,0.4,0.7,1","chartTitle":"输入图表标题...","colorScheme":"blue","backgroundColor":"#ffffff","cellSize":"50","fontSize":"12","minValue":0,"maxValue":0,"chartWidth":"800","chartHeight":"600","showValues":true,"showLabels":false,"showGrid":true,"roundValues":false}'

API 参考

以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。

请求端点

HTTP
POST https://api.elysiatools.com/zh/api/tools/matrix-chart-generator

请求参数

参数名类型必填说明
matrixDatatextarea是Matrix data as 2D array. Supports JSON array or CSV format with comma-separated values
chartTitletext否显示在矩阵图上方的标题
colorSchemeselect否—
backgroundColorcolor否图表的背景颜色
cellSizenumber否每个单元格的像素大小
fontSize

MCP 集成

将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。

服务配置

将以下内容加入你的 MCP 客户端配置:

mcp.json
{
  "mcpServers": {
    "elysiatools-matrix-chart-generator": {
      "name": "matrix-chart-generator",
      "description": "生成相关性和对比矩阵图,支持颜色强度映射和网格布局",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=matrix-chart-generator",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

列出可用工具

连接到 SSE 端点后,列出已开放的工具:

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

调用此工具

通过工具 id 调用,参数由其参数表构建:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "matrix-chart-generator",
    "arguments": {
  "matrixData": "JSON format:\n[\n  [1, 0.8, 0.3, 0.5],\n  [0.8, 1, 0.6, 0.4],\n  [0.3, 0.6, 1, 0.7],\n  [0.5, 0.4, 0.7, 1]\n]\n\nor CSV format:\n1,0.8,0.3,0.5\n0.8,1,0.6,0.4\n0.3,0.6,1,0.7\n0.5,0.4,0.7,1",
  "chartTitle": "输入图表标题...",
  "colorScheme": "blue",
  "backgroundColor": "#ffffff",
  "cellSize": "50",
  "fontSize": "12",
  "minValue": 0,
  "maxValue": 0,
  "chartWidth": "800",
  "chartHeight": "600",
  "showValues": true,
  "showLabels": false,
  "showGrid": true,
  "roundValues": false
}
  }
}
可用逗号分隔的 toolId 在一个会话中串联多个工具,例如 /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp(最多 20 个)。

有问题或反馈?请联系 [email protected]

© 2026 Elysia Tools. 开发者文档。

返回主站浏览工具
number
否
单元格值的字体大小
minValuenumber否颜色刻度的最小值(留空自动)
maxValuenumber否颜色刻度的最大值(留空自动)
chartWidthnumber否图表的像素宽度
chartHeightnumber否图表的像素高度
showValuescheckbox否在单元格内显示数值
showLabelscheckbox否显示行和列标签(如果可用)
showGridcheckbox否在单元格之间显示网格线
roundValuescheckbox否将数值四舍五入为整数显示

响应格式

HTML 结果

JSON
{
  "result": "<div>Processed HTML content</div>",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
浏览工具
打开工具