matlab-build-chart
>
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-build-chart && cp -r /tmp/matlab-build-chart/skills-catalog/matlab-app-building/matlab-build-chart ~/.claude/skills/matlab-build-chartSKILL.md
# MATLAB Chart Builder
Create, customize, and interact with MATLAB charts and plots — in standalone figures, Live Scripts, or uifigure apps.
## When to Use This Skill
Use this skill when:
- Plotting data (line, scatter, bar, histogram, heatmap, surface, polar, geo, volume) in any context
- Configuring axes (labels, limits, ticks, legend, font, export)
- Adding annotations (xline, yline, xregion, text)
- Adding or customizing data tips
- Creating interactive plots (click, hover, drag callbacks)
- Animating or streaming data to a chart
- Arranging multiple axes with tiledlayout/nexttile
- Optimizing chart rendering performance
- Exporting figures for publication or reports
- User says "help me visualize this" without a specific chart type
## When NOT to Use This Skill
- Building a full app (use `matlab-build-app` — it invokes this skill for chart sub-steps)
- Applying dark mode, brand colors, or custom color themes (use `matlab-apply-theme`)
- Working with Simulink scopes or Simscape plots
- Creating App Designer charts via the drag-and-drop GUI
## Workflow
```
User request arrives
|
+-- FAST PATH (most requests)
| Chart type named OR unambiguous single-axes plot
| AND no interactivity / animation / multi-panel / performance concern
| |
| v
| Infer rendering context (default: standalone figure)
| Read relevant references --> Build directly
|
+-- PLAN PATH (complex or ambiguous)
|
+-- Ambiguous intent (no chart type named, unclear data question)
| --> Identify visualization intent (see Intent Taxonomy)
|
+-- Rendering context unclear AND it matters
| --> Ask: standalone figure, Live Script, or uifigure app?
|
v
Present inline plan for approval
|
v
User confirms --> Read references --> Build
```
### Fast-Path Triggers (build directly, no plan)
ALL of these must hold:
- Chart type is named OR intent maps unambiguously to one type
- Single axes (no tiled/multi-panel layout)
- No custom interactivity (no user-specified callbacks)
- No animation or streaming
- No explicit performance constraints
- Rendering context is clear or defaults to standalone figure
### Plan-Path Triggers (present plan first)
ANY of these fires the plan path:
- Multi-panel / tiled figure
- Custom interactivity (click, hover, drag callbacks)
- Animation or streaming data
- Performance-sensitive (large dataset, real-time update)
- Branded / designed figure requiring palette/theme coordination
- Ambiguous "help me visualize this" — unclear type or intent
- Multiple visualization intents in one figure
## Rendering Context
Three contexts gate which constraint set applies:
| Context | Constraints | How inferred |
|---------|-------------|--------------|
| **Standalone figure** | Universal rules only | Default; `figure`/`axes` in request |
| **Live Script** | Universal rules only | User mentions Live Script, `.mlx`, plain-text Live Code |
| **uifigure app** | Universal + uifigure rules | User mentions uifigure; arrives as sub-step of app-builder |
If context is unstated and cannot be inferred, assume standalone figure. Ask only when the distinction matters (e.g., heatmap parent differs between contexts).
## Visualization Intent Taxonomy
Engages ONLY when the user has NOT named a specific chart type or function. If they say "scatter" or "heatmap," skip intent selection and build directly.
### Communicative Intents
| Intent | Data question | Encouraged functions |
|--------|--------------|---------------------|
| **Comparison** | How do values compare across items? | `bar`, `barh`, `bar3`, `bar3h`, `pareto`, `stem`, `stairs`, `loglog`, `semilogx`, `semilogy` |
| **Trend / time series** | How does a value change over time? | `plot`, `area`, `stackedplot`, `stairs`, `stem`, `fplot`, `fplot3` |
| **Distribution** | How is data spread? | `histogram`, `histogram2`, `boxchart`, `violinplot`, `raincloudplot`, `swarmchart`, `swarmchart3`, `scatterhistogram`, `binscatter`, `polarhistogram` |
| **Relationship** | How do variables relate? | `scatter`, `scatter3`, `bubblechart`, `bubblechart3`, `plotmatrix`, `parallelplot`, `binscatter`, `spy`, `fimplicit` |
| **Composition** | Parts of a whole? | `piechart`, `donutchart`, stacked `bar`, stacked `area`, `wordcloud`, `bubblecloud` |
### Data-Domain Intents
| Intent | When it fires | Encouraged functions |
|--------|--------------|---------------------|
| **Geospatial** | Geographic coordinates | `geoplot`, `geoscatter`, `geobubble`, `geodensityplot` |
| **Directional / polar** | Angular, cyclical, compass data | `polarplot`, `polarscatter`, `polarhistogram`, `polarbubblechart`, `compassplot`, `fpolarplot` |
| **Surfaces & scalar fields** | z = f(x,y), meshes, contours | `surf`, `surfc`, `surfl`, `mesh`, `meshc`, `meshz`, `ribbon`, `pcolor`, `contour`, `contourf`, `contour3`, `fcontour`, `fsurf`, `fmesh`, `fimplicit3`, `waterfall` |
| **Vector fields & flow** | Directional vector data | `quiver`, `quiver3`, `feather`, `streamline`, `streamslice`, `streamribbon`, `streamtube`, `streamparticles`, `coneplot` |
| **Volume visualization** | 3D gridded volume data | `slice`, `contourslice`, `coneplot`, `streamslice`, isosurface/isocap workflows |
| **Images & matrices** | Display a matrix/grid | `image`, `imagesc`, `heatmap`, `pcolor` (flat), `spy` |
### Classification Rules
- **The `waterfall` trap:** MATLAB's `waterfall` is a 3D surface plot, NOT the financial accumulation chart. For "accumulation to total," build from `bar` with a hidden base series.
- **`f*` variants** follow their data counterpart's intent: `fplot` -> Trend, `fsurf`/`fmesh`/`fcontour` -> Surfaces, `fimplicit` -> Relationship, `fpolarplot` -> Directional.
- **Animation is cross-cutting**, not an intent. `animatedlin>
Analyze AMS waveform data using Mixed-Signal Blockset utilities: phase noise measurement, clock jitter, anti-aliased resampling, timing measurements, lock time, INL/DNL, ADC/DAC calibration, HSpice import. Use when analyzing time-domain voltage from PLL/VCO/clock simulations, measuring phase noise from variable-step solver output, computing jitter, or resampling non-uniform data.
Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.
Analyze the effective toolbox file set to produce a Dependency Manifest — classify all transitive dependencies as included, product, add-on, or external-unresolved, then present resolution options with tradeoffs. Use after matlab-define-toolbox-api when the spec is approved.
S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pcb-pdn).
Analyze antennas installed on electrically large conducting platforms using MATLAB Antenna Toolbox. Loads platform geometry from STL/STEP/IGES, installs antenna elements, selects electromagnetic solvers (MoM-PO, FMM, MoM), and computes patterns, impedance, coupling, and efficiency. Use when the user wants to model an antenna on a vehicle, aircraft, ship, satellite, or other large structure.
PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current density, power nets, or design rule checking on a PCB. Invoke BEFORE writing code — the PDN API chain is specialized and non-obvious. SKIP: importing a PCB file (use matlab-read-pcb-layout), EM field/S-parameter extraction (use matlab-analyze-em), material/stackup setup only (use matlab-manage-pcb-material), transmission line design (use matlab-design-pcb-txline).
Calculate and visualize monostatic and bistatic radar cross section (RCS) using MATLAB Antenna Toolbox. Computes RCS of platforms, antennas, and arrays with PO, MoM, and FMM solvers, supporting HH/VV/HV/VH polarization, GPU acceleration, and near-field observation. Use when the user wants to compute, plot, or analyze radar cross section.