Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 63b883a

Browse files
committed
webgl tutorial edit
1 parent 6826da4 commit 63b883a

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

_posts/python/WebGL/2015-06-30-webgl.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</div>
2020
<div class="inner_cell">
2121
<div class="text_cell_render border-box-sizing rendered_html">
22-
<p>New to Plotly's python API? <br>
22+
<h4 id="API-authentication">API authentication<a class="anchor-link" href="#API-authentication">&#182;</a></h4><p>New to Plotly's python API? <br>
2323
Learn about API authentication here: <a href="https://plot.ly/python/getting-started">https://plot.ly/python/getting-started</a> <br>
2424
Find your api_key here: <a href="https://plot.ly/settings/api">https://plot.ly/settings/api</a></p>
2525

@@ -165,7 +165,7 @@ <h4 id="WebGL-with-many-traces">WebGL with many traces<a class="anchor-link" hre
165165
</div>
166166
<div class="cell border-box-sizing code_cell rendered">
167167
<div class="input">
168-
<div class="prompt input_prompt">In&nbsp;[3]:</div>
168+
<div class="prompt input_prompt">In&nbsp;[5]:</div>
169169
<div class="inner_cell">
170170
<div class="input_area">
171171
<div class=" highlight hl-ipython2"><pre><span class="kn">import</span> <span class="nn">plotly.plotly</span> <span class="kn">as</span> <span class="nn">py</span>
@@ -174,7 +174,7 @@ <h4 id="WebGL-with-many-traces">WebGL with many traces<a class="anchor-link" hre
174174
<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
175175

176176
<span class="n">data</span> <span class="o">=</span> <span class="p">[]</span>
177-
<span class="n">trace_num</span> <span class="o">=</span> <span class="mi">20</span>
177+
<span class="n">trace_num</span> <span class="o">=</span> <span class="mi">10</span>
178178
<span class="n">point_num</span> <span class="o">=</span> <span class="mi">5000</span>
179179
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">trace_num</span><span class="p">):</span>
180180
<span class="n">data</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">go</span><span class="o">.</span><span class="n">Scattergl</span><span class="p">(</span>
@@ -195,7 +195,7 @@ <h4 id="WebGL-with-many-traces">WebGL with many traces<a class="anchor-link" hre
195195
<div class="output">
196196

197197

198-
<div class="output_area"><div class="prompt output_prompt">Out[3]:</div>
198+
<div class="output_area"><div class="prompt output_prompt">Out[5]:</div>
199199

200200
<div class="output_html rendered_html output_subarea output_execute_result">
201201
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~chelsea_lyn/8850.embed" height="525px" width="100%"></iframe>

_posts/python/WebGL/webgl.ipynb

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"New to Plotly's python API? <br>\n",
7+
"#### API authentication\n",
8+
"New to Plotly's python API? <br> \n",
89
"Learn about API authentication here: https://plot.ly/python/getting-started <br>\n",
910
"Find your api_key here: https://plot.ly/settings/api"
1011
]
@@ -131,7 +132,7 @@
131132
},
132133
{
133134
"cell_type": "code",
134-
"execution_count": 3,
135+
"execution_count": 5,
135136
"metadata": {
136137
"collapsed": false
137138
},
@@ -145,7 +146,7 @@
145146
"<plotly.tools.PlotlyDisplay object>"
146147
]
147148
},
148-
"execution_count": 3,
149+
"execution_count": 5,
149150
"metadata": {},
150151
"output_type": "execute_result"
151152
}
@@ -157,7 +158,7 @@
157158
"import numpy as np\n",
158159
"\n",
159160
"data = []\n",
160-
"trace_num = 20\n",
161+
"trace_num = 10\n",
161162
"point_num = 5000\n",
162163
"for i in range(trace_num):\n",
163164
" data.append(go.Scattergl(\n",
@@ -186,7 +187,7 @@
186187
},
187188
{
188189
"cell_type": "code",
189-
"execution_count": 4,
190+
"execution_count": 6,
190191
"metadata": {
191192
"collapsed": false
192193
},
@@ -220,7 +221,7 @@
220221
"output_type": "stream",
221222
"text": [
222223
"Collecting git+https://github.com/plotly/publisher.git\n",
223-
" Cloning https://github.com/plotly/publisher.git to /var/folders/72/g6h98xwx0h1gp4kc8rzhsdh80000gn/T/pip-MlrCFr-build\n",
224+
" Cloning https://github.com/plotly/publisher.git to /var/folders/72/g6h98xwx0h1gp4kc8rzhsdh80000gn/T/pip-zYQFwJ-build\n",
224225
"Installing collected packages: publisher\n",
225226
" Found existing installation: publisher 0.10\n",
226227
" Uninstalling publisher-0.10:\n",
@@ -230,20 +231,6 @@
230231
"\u001b[33mYou are using pip version 8.0.3, however version 8.1.1 is available.\n",
231232
"You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n"
232233
]
233-
},
234-
{
235-
"name": "stderr",
236-
"output_type": "stream",
237-
"text": [
238-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning:\n",
239-
"\n",
240-
"The `IPython.nbconvert` package has been deprecated. You should import from nbconvert instead.\n",
241-
"\n",
242-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/publisher/publisher.py:53: UserWarning:\n",
243-
"\n",
244-
"Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
245-
"\n"
246-
]
247234
}
248235
],
249236
"source": [

0 commit comments

Comments
 (0)