> Create and customize MATLAB charts and plots. Plot types (line, scatter, bar, histogram, heatmap, surface), axes configuration, annotations, data tips, interactive plots, animation, multiple axes with tiledlayout, colororder, and performance optimization. Works for standalone figures, Live Scripts, and uifigure apps. Use when plotting data, customizing axes, adding annotations or interactivity, uiaxes, annotation, data tips, animation, tiledlayout, colororder, heatmap, scatter, figure, visualization, export.
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-build-chart
Create, customize, and interact with MATLAB charts and plots — in standalone figures, Live Scripts, or uifigure apps.
Use this skill when:
matlab-build-app — it invokes this skill for chart sub-steps)matlab-theming)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
ALL of these must hold:
ANY of these fires the plan path:
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).
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.
| 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 |
| 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 |
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.animatedline, comet, comet3 layer motion onto any chart type. See references/animation.md.piechart/donutchart are Composition regardless of where docs file them.When the plan path engages, present for approval:
**Chart Plan: [description]**
**Context:** [Standalone figure / Live Script / uifigure app]
**Intent:** [name] -> [chosen function(s)]
**Structure:**
- [Layout description]
- [Key visual elements, annotations, interactions]
**Key decisions:**
- [Performance strategy, if applicable] [src: references/performance.md SS]
- [Interaction model, if applicable] [src: references/interactive-plots.md SS]
- [uifigure constraints that apply, if context = uifigure]
**References to use:**
| Reference | Role | Provenance |
|-----------|------|------------|
| `references/file.md` | [what it provides] | [src: references/file.md SS] |
Shall I proceed?
Do NOT write the plan to a file unless (a) the user explicitly asks for a spec to keep, or (b) chart-builder is running as a sub-step of an app build with an existing plan artifact.
plot(ax, x, y) not plot(x, y)p.XData = newX) — never replot in a loopdrawnow limitrate for animations — never bare drawnow in tight loopstiledlayout/nexttile over subplot() for multiple axesexportgraphics() for publication-quality exportuiaxes — never plain axesexportgraphics() or exportapp() — saveas/print not supportedsubplot() — not supported in uifigureannotation() — use text(), xline(), yline(), xregion(), yregion()ginput() — use ButtonDownFcn on plot objectsgcf/gca — uiaxes has HandleVisibility = 'off' by defaultfig = figure;
ax = axes(fig);
t = 0:0.01:2*pi;
plot(ax, t, sin(t), 'LineWidth', 1.5);
hold(ax, 'on');
plot(ax, t, cos(t), '--', 'LineWidth', 1.5);
hold(ax, 'off');
title(ax, 'Sine and Cosine');
xlabel(ax, 'Time (s)');
ylabel(ax, 'Amplitude');
legend(ax, 'sin', 'cos');
grid(ax, 'on');
exportgraphics(ax, 'plot.png', 'Resolution', 300);
fig = uifigure('Name', 'Chart Demo');
gl = uigridlayout(fig, [1 1]);
ax = uiaxes(gl);
plot(ax, t, sin(t), 'LineWidth', 1.5);
% Same API from here — only axes creation differs
Once you have ax, all plotting calls (plot, scatter, bar, xline, hold, legend, colororder, etc.) are identical regardless of context.
ax as first argumenthold(ax, 'on') used before adding multiple seriesxline/yline/text (not annotation() — uifigure requirement)ButtonDownFcn on plot objects (not axes — uifigure requirement)drawnow limitrate and pre-set axis limitsexportgraphics() (required in uifigure; preferred everywhere)tiledlayout/nexttile (required in uifigure; preferred everywhere)Issues marked *(uifigure only)* apply only when plotting in uifigure apps.
| Problem | Cause | Fix |
|---|---|---|
| Animation is slow/jerky | Using plot() in loop or bare drawnow | Update data in place + drawnow limitrate |
| Plot disappears after replot | Default NextPlot = 'replacechildren' | Use hold(ax, 'on') or update data in place |
| gcf/gca return wrong handle *(uifigure only)* | uiaxes HandleVisibility = 'off' | Always pass ax explicitly |
| annotation() error *(uifigure only)* | Not supported in uifigure | Use text(), xline(), yline() |
| ginput() error *(uifigure only)* | Not supported in uifigure | Use ButtonDownFcn on plot objects |
| Click callback doesn't fire on axes *(uifigure only)* | ButtonDownFcn unreliable on uiaxes | Put ButtonDownFcn on plot objects |
| Heatmap fails in uiaxes *(uifigure only)* | Heatmap needs figure/panel parent | Use heatmap(fig, ...) or heatmap(panel, ...) |
| saveas fails *(uifigure only)* | Not supported for uifigure | Use exportgraphics(ax, file) |
| subplot() errors *(uifigure only)* | Not supported in uifigure | Use tiledlayout/nexttile or uigridlayout |
| Zoom stops working after scroll callback *(uifigure only)* | WindowScrollWheelFcn disables zoom | Call disableDefaultInteractivity(ax) |
| Topic | File | Coverage | Intent served |
|-------|------|----------|---------------|
| Plot types | references/plot-types.md | Line, scatter, bar, histogram, heatmap, surface | Comparison, Trend, Distribution, Relationship, Surfaces (partial) |
| Axes configuration | references/axes-config.md | uiaxes setup, labels, limits, ticks, font, legend, export | All intents |
| Annotations | references/annotations.md | xline, yline, xregion, text, patch | All intents (overlay) |
| Data tips | references/data-tips.md | DataTipTemplate, custom rows, programmatic tips | All intents (overlay) |
| Interactive plots | references/interactive-plots.md | ButtonDownFcn, mouse callbacks, drag, HitTest, toolbar | Plan-path: interactivity |
| Chart palettes | references/chart-palettes.md | colororder, named palettes, SeriesIndex, vs colormap | All intents (styling) |
| Animation | references/animation.md | Update in place, animatedline, streaming, performance | Plan-path: animation |
| Multiple axes | references/multiple-axes.md | tiledlayout, nexttile, linkaxes, peripheral tiles | Plan-path: multi-panel |
| Performance | references/performance.md | Lazy-load, batch updates, throttle, parfeval, startup | Plan-path: performance |
These intents have no dedicated reference file. Use built-in MATLAB API knowledge:
piechart, donutchart, stacked bar/area, wordcloud, bubblecloudgeoplot, geoscatter, geobubble, geodensityplotpolarplot, polarscatter, polarhistogram, polarbubblechart, compassplot, fpolarplotquiver, quiver3, feather, streamline, streamslice, streamribbon, streamtube, streamparticles, coneplotslice, contourslice, coneplot, isosurface/isocap workflowsimage, imagesc not covered; heatmap in plot-typessurf covered; mesh, contour, ribbon, pcolor pendingmatlab-theming — when the chart needs dark mode, brand colors, or custom palettes----
Copyright 2026 The MathWorks, Inc.
----
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.
UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.
Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.
Take matlab/matlab-build-chart from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.