forked from plotly/plotly_matlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetplotlyfig.m
More file actions
41 lines (23 loc) · 1005 Bytes
/
getplotlyfig.m
File metadata and controls
41 lines (23 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function p = getplotlyfig(file_owner, file_id)
%-----------------------------SAVEPLOTLYFIG-------------------------------%
% Grab an online Plotly figure's data/layout information
% [CALL]:
% p = getplotlyfig(file_owner file_id)
% [INPUTS]: [TYPE]{default} - description/'options'
% file_owner: [string]{} - Unique Plotly username
% file_id [int]{} - the id of the graph you want to obtain
% [OUTPUT]:
% p - plotlyfig object
% [EXAMPLE]:
% url: https://plot.ly/~demos/1526
% fig = getplotlyfig('demos','1526');
% [ADDITIONAL RESOURCES]:
% For full documentation and examples, see https://plot.ly/matlab/get-requests/
%-------------------------------------------------------------------------%
%--CONSTRUCT PLOTLY FIGURE OBJECT--%
p = plotlyfig('Visible','off');
%-------------------------------------------------------------------------%
%--MAKE CALL TO DOWNLOAD METHOD--%
p.download(file_owner, file_id);
%-------------------------------------------------------------------------%
end