% Get this figure: fig = getplotlyfig('MattSundquist', 13137) % Get this figure's data: fig = getplotlyfig('MattSundquist', 13137); fig.data % Add data to this figure: plotly([1, 2], [2, 3], struct('filename', 'Division of Work in a Typical Workweek', 'fileopt', 'extend')) % Get y data of first trace: fig = getplotlyfig('MattSundquist', 13137); y1 = fig.data{1}.y % Get figure documentation: https://plotly.com/matlab/get-requests/ % Add data documentation: https://plotly.com/matlab/file-options/ % You can reproduce this figure in MATLAB with the following code! % Learn about API authentication here: https://plotly.com/matlab/getting-started % Find your api_key here: https://plotly.com/settings/api signin('username', 'api_key') trace1 = struct(... 'uid', 'e7075d', ... 'name', 'Col2_% of Average Workweek, trace1_y, trace2_y', ... 'type', 'bar', ... 'x', { {'14', '19', '28', '39'} }, ... 'y', { {'Searching and
Gathering Information', 'Communicating and
collaborating internally', 'Reading and Answering Email', 'Completing Tasks'} }, ... 'orientation', 'h'); data = {trace1}; layout = struct(... 'title', 'Division of Work in a Typical Workweek', ... 'width', 592, ... 'xaxis', struct(... 'type', 'linear', ... 'range', [0, 41.05263157894737], ... 'zeroline', false, ... 'autorange', true, ... 'ticksuffix', '%'), ... 'yaxis', struct(... 'type', 'category', ... 'range', [-0.5, 3.5], ... 'title', '', ... 'zeroline', false, ... 'autorange', true), ... 'height', 433, ... 'margin', struct('l', 200), ... 'autosize', true, ... 'showlegend', false); response = plotly(data, struct('layout', layout)); plot_url = response.url