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

Get Requests in MATLAB®

How to download plotly users's public graphs and data with MATLAB®.


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

trace1 = struct(...
  'x', [1, 2, 3, 4], ...
  'y', [10, 15, 13, 17], ...
  'type', 'scatter');
trace2 = struct(...
  'x', [1, 2, 3, 4], ...
  'y', [16, 5, 11, 9], ...
  'type', 'scatter');
data = {trace1, trace2};
response = plotly(data, struct('filename', 'get-requests-example', 'fileopt', 'overwrite'));
plot_url = response.url

MATLAB is a registered trademark of The MathWorks, Inc.