Black Lives Matter. Please consider donating to Black Girls Code today.

Plotly Graphing Library for MATLAB®

Create interactive charts in your web browser with MATLAB® and Plotly.

Plotly brings interactive, online graphing to your MATLAB® console.

x = 80 * randn(1, 30);
y = 80 * randn(size(x));
r = randi(1500, size(x));
c = randi(10, size(x));

fig = figure;

scatter(x, y, r, c, 'filled', 'MarkerEdgeColor', 'k')


response = fig2plotly(fig, 'filename', 'matlab-bubble-chart',  'strip', false);
plotly_url = response.url;

Plotly's MATLAB® graphs are interactive in the web browser. Hover over values, scroll to zoom, click-and-drag to rotate and pan. Since Plotly graphs are built with native web technologies javascript, SVG, d3.js, and webgl, no plugins or downloads are required.
[X,Y,Z] = peaks;

Plotly's MATLAB® graphs are created with HTML and JavaScript. You can save and share your MATLAB® figures with Plotly's cloud service or you can generate and serve this HTML and JavaScript with the self-hosted desktop Plotly Graphing Library for MATLAB® .
X = linspace(0,2*pi,50)';
Y = [cos(X), 0.5*sin(X)];
fig2plotly(gcf, 'offline', true);

self-hosted matlab online

Use Plotly with MATLAB® to share your figures with non-MATLAB® users, to create web-based MATLAB® dashboards, as the visualization toolbox in MATLAB® web applications, or just for publication quality vector image export.

Documentation Examples

Basic Charts
Statistical Charts
Scientific Charts
3D Charts
Layout Options
Add Custom Controls with JavaScript

All Plotly charts have click, hover and zoom events exposed to add custom controls with Plotly's JavaScript postMessage API.

Image Export & Retrieving Plots

MATLAB is a registered trademark of The MathWorks, Inc.