@@ -49,7 +49,8 @@ def warning_on_one_line(message, category, filename, lineno, file=None, line=Non
4949 'api_key' : '' ,
5050 'stream_ids' : []},
5151 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' }}
5354
5455try :
5556 os .mkdir (TEST_DIR )
@@ -139,7 +140,9 @@ def reset_credentials_file():
139140
140141### config tools ###
141142
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 ):
143146 """Set the keyword-value pairs in `~/.plotly/.config`.
144147
145148 """
@@ -152,6 +155,8 @@ def set_config_file(plotly_domain=None, plotly_streaming_domain=None):
152155 settings ['plotly_domain' ] = plotly_domain
153156 if isinstance (plotly_streaming_domain , six .string_types ):
154157 settings ['plotly_streaming_domain' ] = plotly_streaming_domain
158+ if isinstance (plotly_api_domain , six .string_types ):
159+ settings ['plotly_api_domain' ] = plotly_api_domain
155160 utils .save_json_dict (CONFIG_FILE , settings )
156161 ensure_local_plotly_files () # make sure what we just put there is OK
157162
@@ -183,7 +188,7 @@ def reset_config_file():
183188
184189def get_embed (file_owner_or_url , file_id = None , width = "100%" , height = 525 ):
185190 """Returns HTML code to embed figure on a webpage as an <iframe>
186-
191+
187192 Plotly uniquely identifies figures with a 'file_owner'/'file_id' pair.
188193 Since each file is given a corresponding unique url, you may also simply
189194 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):
262267
263268def embed (file_owner_or_url , file_id = None , width = "100%" , height = 525 ):
264269 """Embeds existing Plotly figure in IPython Notebook
265-
270+
266271 Plotly uniquely identifies figures with a 'file_owner'/'file_id' pair.
267272 Since each file is given a corresponding unique url, you may also simply
268273 pass a valid plotly url as the first argument.
0 commit comments