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

Adding Zoom Effects in MATLAB®

How to bind callback functions to zoom events in JavaScript charts.

# Learn about API authentication here: https://plotly.com/matlab/getting-started
# Find your api_key here: https://plotly.com/settings/api

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


% strip = false => preserve MATLAB<sup>&reg;</sup> style!

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

MATLAB is a registered trademark of The MathWorks, Inc.