1
- function saveplotlyconfig(plotly_domain ,plotly_streaming_domain )
1
+ function saveplotlyconfig(plotly_domain ,plotly_streaming_domain , sharing )
2
2
% Save plotly config info.
3
3
% Plotly config info are saved as JSON strings
4
4
% in ~/.plotly/.config
@@ -8,7 +8,7 @@ function saveplotlyconfig(plotly_domain,plotly_streaming_domain)
8
8
error(' plotly:saveconfig' , ...
9
9
[' Incorrect number of inputs. Please save your configuration ' , ...
10
10
' as follows: >> saveplotlyconfig(plotly_domain,' , ...
11
- ' [optional]plotly_streaming_domain)' ]);
11
+ ' [optional]plotly_streaming_domain, ' , ' [optional]sharing )' ]);
12
12
end
13
13
14
14
% if the config file exists, then load it up
@@ -56,6 +56,17 @@ function saveplotlyconfig(plotly_domain,plotly_streaming_domain)
56
56
config.plotly_domain = plotly_domain ;
57
57
signin(username , api_key , plotly_domain );
58
58
config.plotly_streaming_domain= plotly_streaming_domain ;
59
+ case 3
60
+ config.plotly_domain = plotly_domain ;
61
+ signin(username , api_key , plotly_domain );
62
+ config.plotly_streaming_domain = plotly_streaming_domain ;
63
+ sharing = lower(sharing );
64
+ if (strcmp(sharing , ' public' ) | strcmp(sharing , ' private' ))
65
+ config.sharing = sharing ;
66
+ else
67
+ warning([' "%s " is an invalid/un-supported value of sharing.\n ' , ...
68
+ ' Please use one of "public" or "private"' ], sharing );
69
+ end
59
70
otherwise % if neither endpoints are specified, no worries!
60
71
end
61
72
0 commit comments