@@ -49,7 +49,8 @@ def warning_on_one_line(message, category, filename, lineno, file=None, line=Non
49
49
'api_key' : '' ,
50
50
'stream_ids' : []},
51
51
CONFIG_FILE : {'plotly_domain' : 'https://plot.ly' ,
52
- 'plotly_streaming_domain' : 'stream.plot.ly' }}
52
+ 'plotly_streaming_domain' : 'stream.plot.ly' ,
53
+ 'plotly_api_domain' : 'https://api.plot.ly' }}
53
54
54
55
try :
55
56
os .mkdir (TEST_DIR )
@@ -139,7 +140,9 @@ def reset_credentials_file():
139
140
140
141
### config tools ###
141
142
142
- def set_config_file (plotly_domain = None , plotly_streaming_domain = None ):
143
+ def set_config_file (plotly_domain = None ,
144
+ plotly_streaming_domain = None ,
145
+ plotly_api_domain = None ):
143
146
"""Set the keyword-value pairs in `~/.plotly/.config`.
144
147
145
148
"""
@@ -152,6 +155,8 @@ def set_config_file(plotly_domain=None, plotly_streaming_domain=None):
152
155
settings ['plotly_domain' ] = plotly_domain
153
156
if isinstance (plotly_streaming_domain , six .string_types ):
154
157
settings ['plotly_streaming_domain' ] = plotly_streaming_domain
158
+ if isinstance (plotly_api_domain , six .string_types ):
159
+ settings ['plotly_api_domain' ] = plotly_api_domain
155
160
utils .save_json_dict (CONFIG_FILE , settings )
156
161
ensure_local_plotly_files () # make sure what we just put there is OK
157
162
@@ -183,7 +188,7 @@ def reset_config_file():
183
188
184
189
def get_embed (file_owner_or_url , file_id = None , width = "100%" , height = 525 ):
185
190
"""Returns HTML code to embed figure on a webpage as an <iframe>
186
-
191
+
187
192
Plotly uniquely identifies figures with a 'file_owner'/'file_id' pair.
188
193
Since each file is given a corresponding unique url, you may also simply
189
194
pass a valid plotly url as the first argument.
@@ -262,7 +267,7 @@ def get_embed(file_owner_or_url, file_id=None, width="100%", height=525):
262
267
263
268
def embed (file_owner_or_url , file_id = None , width = "100%" , height = 525 ):
264
269
"""Embeds existing Plotly figure in IPython Notebook
265
-
270
+
266
271
Plotly uniquely identifies figures with a 'file_owner'/'file_id' pair.
267
272
Since each file is given a corresponding unique url, you may also simply
268
273
pass a valid plotly url as the first argument.
0 commit comments