Skip to content

Commit e53ea46

Browse files
HanSur94claude
andcommitted
docs: add MATLAB-to-Plotly plot conversion feature section to README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 24e6f2d commit e53ea46

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,28 @@ A Python MCP server that connects **any AI agent** (Claude, Cursor, Copilot, cus
5757
| Progress reporting | Long jobs report percentage back to the agent |
5858
| Cross-platform | Windows + macOS, MATLAB 2020b+ |
5959

60+
## MATLAB Plot Conversion to Interactive Plotly
61+
62+
Every MATLAB figure is automatically converted into an interactive [Plotly](https://plotly.com/javascript/) chart — no extra code needed. When your MATLAB code creates a plot, the server:
63+
64+
1. **Extracts figure properties** via `mcp_extract_props.m` — axes, line data, labels, colors, markers, legends, subplots
65+
2. **Maps MATLAB styles to Plotly** — line styles (`--``dash`), markers (`o``circle`), legend positions, axis scales, colormaps
66+
3. **Returns interactive JSON** — renderable in any web UI with `Plotly.newPlot()`
67+
4. **Generates a static PNG + thumbnail** as fallback for non-interactive clients
68+
69+
**Supported plot types:** line, scatter, bar, area, subplots (`subplot`/`tiledlayout`), multiple axes, log/linear scales
70+
71+
**Style fidelity:** Line styles, marker shapes, colors (RGB), line widths, font sizes, axis labels, titles, legends, grid lines, axis limits, and background colors are all preserved.
72+
73+
```matlab
74+
% This MATLAB code...
75+
x = linspace(0, 2*pi, 100);
76+
subplot(2,1,1); plot(x, sin(x), 'r--', 'LineWidth', 2); title('Sine');
77+
subplot(2,1,2); plot(x, cos(x), 'b-.o'); title('Cosine');
78+
```
79+
80+
...returns interactive Plotly JSON with both subplots, red dashed lines, blue dash-dot with circle markers, titles, and layout — all automatically.
81+
6082
## Quick Start
6183

6284
### Prerequisites

0 commit comments

Comments
 (0)