@@ -55,9 +55,23 @@ def init_notebook_mode(connected=False):
55
55
56
56
Keyword arguments:
57
57
58
- connected (default=False) -- if connected is True, this means that the
59
- plotly.js library will be loaded from a CDN(online) rather than the
60
- local file from pip.
58
+ connected (default=False) -- If True, the plotly.js library will be loaded
59
+ from an online CDN. If False, the plotly.js library will be loaded locally
60
+ from the plotly python package
61
+
62
+ Use `connected=True` if you want your notebooks to have smaller file sizes.
63
+ In the case where `connected=False`, the entirety of the plotly.js library
64
+ will be loaded into the notebook, which will result in a file-size increase
65
+ of a couple megabytes. Additionally, because the library will be downloaded
66
+ from the web, you and your viewers must be connected to the internet to be
67
+ able to view charts within this notebook.
68
+
69
+ Use `connected=False` if you want you and your collaborators to be able to
70
+ create and view these charts regardless of the availability of an internet
71
+ connection. This is the default option since it is the most predictable.
72
+ Note that under this setting the library will be included inline inside
73
+ your notebook, resulting in much larger notebook sizes compared to the case
74
+ where `connected=True`.
61
75
"""
62
76
if not _ipython_imported :
63
77
raise ImportError ('`iplot` can only run inside an IPython Notebook.' )
@@ -71,6 +85,7 @@ def init_notebook_mode(connected=False):
71
85
'<script>'
72
86
'requirejs.config({'
73
87
'paths: { '
88
+ # Note we omit the extension .js because require will include it.
74
89
'\' plotly\' : [\' https://cdn.plot.ly/plotly-latest.min\' ]},'
75
90
'});'
76
91
'if(!window.Plotly) {{'
0 commit comments