File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 10
10
%
11
11
% For full documentation and examples, see https://plot.ly/api
12
12
origin = ' plot' ;
13
- offline = false ;
13
+ offline_given = true ;
14
14
struct_provided = false ;
15
15
16
16
if isstruct(varargin{end })
17
17
structargs = varargin{end };
18
18
f = lower(fieldnames(structargs ));
19
+
20
+ if any(strcmp(' offline' , f ))
21
+ offline = getfield(structargs , ' offline' );
22
+ offline_given = offline ;
23
+ else
24
+ offline = false ;
25
+ offline_given = offline ;
26
+ end
27
+
28
+
19
29
if ~any(strcmp(' filename' ,f ))
20
30
if offline
21
31
structargs.filename = ' untitled' ;
26
36
if ~any(strcmp(' fileopt' ,f ))
27
37
structargs.fileopt = NaN ;
28
38
end
29
- if any(strcmp(' offline' , f ))
30
- offline = getfield(structargs , ' offline' );
31
- end
39
+
32
40
33
41
struct_provided = true ;
34
42
35
43
args = varargin(1 : (end - 1 ));
36
44
37
45
else
38
46
39
- if offline
47
+ if offline_given
40
48
structargs = struct(' filename' , ' untitled' , ' fileopt' , NaN );
41
49
else
42
50
structargs = struct(' filename' , NaN ,' fileopt' ,NaN );
45
53
struct_provided = false ;
46
54
end
47
55
48
- if offline
56
+ if offline_given
49
57
if (struct_provided )
50
58
nofig_obj = plotlynofig(varargin{1 : end - 1 }, structargs );
51
59
else
You can’t perform that action at this time.
0 commit comments