File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1010%
1111% For full documentation and examples, see https://plot.ly/api
1212origin = ' plot' ;
13- offline = false ;
13+ offline_given = true ;
1414struct_provided = false ;
1515
1616if isstruct(varargin{end })
1717 structargs = varargin{end };
1818 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+
1929 if ~any(strcmp(' filename' ,f ))
2030 if offline
2131 structargs.filename = ' untitled' ;
2636 if ~any(strcmp(' fileopt' ,f ))
2737 structargs.fileopt = NaN ;
2838 end
29- if any(strcmp(' offline' , f ))
30- offline = getfield(structargs , ' offline' );
31- end
39+
3240
3341 struct_provided = true ;
3442
3543 args = varargin(1 : (end - 1 ));
3644
3745else
3846
39- if offline
47+ if offline_given
4048 structargs = struct(' filename' , ' untitled' , ' fileopt' , NaN );
4149 else
4250 structargs = struct(' filename' , NaN ,' fileopt' ,NaN );
4553 struct_provided = false ;
4654end
4755
48- if offline
56+ if offline_given
4957 if (struct_provided )
5058 nofig_obj = plotlynofig(varargin{1 : end - 1 }, structargs );
5159 else
You can’t perform that action at this time.
0 commit comments