Show Sidebar Hide Sidebar

Plotly MATLAB® Graphing Library

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')

%--PLOTLY--%

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;
contour(X,Y,Z,20);
fig2plotly();

Plotly 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 MATLAB® toolbox.
getplotlyoffline('https://cdn.plot.ly/plotly-latest.min.js')
X = linspace(0,2*pi,50)';
Y = [cos(X), 0.5*sin(X)];
stem(X,Y)
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
Subplots
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.

Tutorial
Image Export & Retrieving Plots

MATLAB is a registered trademark of The MathWorks, Inc.