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

Skip to content

Commit 0ea23ea

Browse files
committed
update version check in fundamentals section and make sure everything
runs in plotly 2.7
1 parent 6abd248 commit 0ea23ea

12 files changed

+95
-3956
lines changed

_posts/python-version2/fundamentals/fileopt/2015-06-30-fileopts.html

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
thumbnail: thumbnail/horizontal-bar.jpg
77
layout: user-guide
88
language: python
9-
version: 2
109
title: Python Filenames Options | Plotly
1110
display_as: file_settings
1211
has_thumbnail: true
12+
version: 2
1313
page_type: example_index
1414
order: 3
1515
---
@@ -29,44 +29,10 @@ <h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotl
2929
</div>
3030
<div class="inner_cell">
3131
<div class="text_cell_render border-box-sizing rendered_html">
32-
<h4 id="Version-Check">Version Check<a class="anchor-link" href="#Version-Check">&#182;</a></h4><p>Plotly's python package is updated frequently. Run <code>pip install plotly --upgrade</code> to use the latest version.</p>
33-
34-
</div>
35-
</div>
36-
</div>
37-
<div class="cell border-box-sizing code_cell rendered">
38-
<div class="input">
39-
<div class="prompt input_prompt">In&nbsp;[1]:</div>
40-
<div class="inner_cell">
41-
<div class="input_area">
42-
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly</span>
43-
<span class="n">plotly</span><span class="o">.</span><span class="n">__version__</span>
44-
</pre></div>
45-
46-
</div>
47-
</div>
48-
</div>
49-
50-
<div class="output_wrapper">
51-
<div class="output">
52-
53-
54-
<div class="output_area">
55-
56-
<div class="prompt output_prompt">Out[1]:</div>
57-
58-
59-
60-
61-
<div class="output_text output_subarea output_execute_result">
62-
<pre>&#39;2.4.1&#39;</pre>
63-
</div>
64-
65-
</div>
32+
<h4 id="Version-Check">Version Check<a class="anchor-link" href="#Version-Check">&#182;</a></h4><p>This is documentation for version 2 of plotly.py. See the <a href="https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#270---2018-05-23">changelog</a> for differences between package versions.</p>
6633

6734
</div>
6835
</div>
69-
7036
</div>
7137
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
7238
</div>
@@ -87,7 +53,7 @@ <h4 id="Overwriting-existing-graphs-and-updating-a-graph-at-its-unique-URL">Over
8753
</div>
8854
<div class="cell border-box-sizing code_cell rendered">
8955
<div class="input">
90-
<div class="prompt input_prompt">In&nbsp;[2]:</div>
56+
<div class="prompt input_prompt">In&nbsp;[1]:</div>
9157
<div class="inner_cell">
9258
<div class="input_area">
9359
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly.plotly</span> <span class="kn">as</span> <span class="nn">py</span>
@@ -274,14 +240,33 @@ <h4 id="Extending-traces-in-an-existing-graph">Extending traces in an existing g
274240
<span class="n">data</span> <span class="o">=</span> <span class="p">[</span><span class="n">trace0</span><span class="p">,</span> <span class="n">trace1</span><span class="p">,</span> <span class="n">trace2</span><span class="p">]</span>
275241

276242
<span class="c1"># Take 2: extend the traces on the plot with the data in the order supplied.</span>
277-
<span class="n">plot_url</span> <span class="o">=</span> <span class="n">py</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">filename</span><span class="o">=</span><span class="s1">&#39;extend plot&#39;</span><span class="p">,</span> <span class="n">fileopt</span><span class="o">=</span><span class="s1">&#39;extend&#39;</span><span class="p">)</span>
243+
<span class="n">py</span><span class="o">.</span><span class="n">iplot</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">filename</span><span class="o">=</span><span class="s1">&#39;extend plot&#39;</span><span class="p">,</span> <span class="n">fileopt</span><span class="o">=</span><span class="s1">&#39;extend&#39;</span><span class="p">)</span>
278244
</pre></div>
279245

280246
</div>
281247
</div>
282248
</div>
283249

250+
<div class="output_wrapper">
251+
<div class="output">
252+
253+
254+
<div class="output_area">
255+
256+
<div class="prompt output_prompt">Out[6]:</div>
257+
258+
259+
260+
<div class="output_html rendered_html output_subarea output_execute_result">
261+
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~PythonPlotBot/2523.embed" height="525px" width="100%"></iframe>
262+
</div>
263+
264+
</div>
265+
266+
</div>
284267
</div>
285268

269+
</div>
270+
286271

287-
{% endraw %}
272+
{% endraw %}

_posts/python-version2/fundamentals/fileopt/fileopts.ipynb

Lines changed: 21 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,7 @@
1515
"metadata": {},
1616
"source": [
1717
"#### Version Check\n",
18-
"Plotly's python package is updated frequently. Run `pip install plotly --upgrade` to use the latest version."
19-
]
20-
},
21-
{
22-
"cell_type": "code",
23-
"execution_count": 1,
24-
"metadata": {},
25-
"outputs": [
26-
{
27-
"data": {
28-
"text/plain": [
29-
"'3.0.0rc5'"
30-
]
31-
},
32-
"execution_count": 1,
33-
"metadata": {},
34-
"output_type": "execute_result"
35-
}
36-
],
37-
"source": [
38-
"import plotly\n",
39-
"plotly.__version__"
18+
"This is documentation for version 2 of plotly.py. See the [changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#270---2018-05-23) for differences between package versions."
4019
]
4120
},
4221
{
@@ -55,7 +34,7 @@
5534
},
5635
{
5736
"cell_type": "code",
58-
"execution_count": 2,
37+
"execution_count": 1,
5938
"metadata": {},
6039
"outputs": [],
6140
"source": [
@@ -121,7 +100,7 @@
121100
},
122101
{
123102
"cell_type": "code",
124-
"execution_count": 5,
103+
"execution_count": 4,
125104
"metadata": {},
126105
"outputs": [],
127106
"source": [
@@ -154,7 +133,7 @@
154133
},
155134
{
156135
"cell_type": "code",
157-
"execution_count": 6,
136+
"execution_count": 5,
158137
"metadata": {},
159138
"outputs": [],
160139
"source": [
@@ -191,19 +170,19 @@
191170
},
192171
{
193172
"cell_type": "code",
194-
"execution_count": 8,
173+
"execution_count": 6,
195174
"metadata": {},
196175
"outputs": [
197176
{
198177
"data": {
199178
"text/html": [
200-
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~chelsea_lyn/17385.embed\" height=\"525px\" width=\"100%\"></iframe>"
179+
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~PythonPlotBot/2523.embed\" height=\"525px\" width=\"100%\"></iframe>"
201180
],
202181
"text/plain": [
203182
"<plotly.tools.PlotlyDisplay object>"
204183
]
205184
},
206-
"execution_count": 8,
185+
"execution_count": 6,
207186
"metadata": {},
208187
"output_type": "execute_result"
209188
}
@@ -235,7 +214,7 @@
235214
},
236215
{
237216
"cell_type": "code",
238-
"execution_count": 7,
217+
"execution_count": 8,
239218
"metadata": {},
240219
"outputs": [
241220
{
@@ -267,28 +246,18 @@
267246
"output_type": "stream",
268247
"text": [
269248
"Collecting git+https://github.com/plotly/publisher.git\n",
270-
" Cloning https://github.com/plotly/publisher.git to c:\\users\\brand\\appdata\\local\\temp\\pip-req-build-fwemv9ri\n",
249+
" Cloning https://github.com/plotly/publisher.git to /tmp/pip-req-build-ed1leV\n",
250+
"Building wheels for collected packages: publisher\n",
251+
" Running setup.py bdist_wheel for publisher ... \u001b[?25ldone\n",
252+
"\u001b[?25h Stored in directory: /tmp/pip-ephem-wheel-cache-aK_SeJ/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n",
253+
"Successfully built publisher\n",
271254
"Installing collected packages: publisher\n",
272255
" Found existing installation: publisher 0.11\n",
273256
" Uninstalling publisher-0.11:\n",
274257
" Successfully uninstalled publisher-0.11\n",
275-
" Running setup.py install for publisher: started\n",
276-
" Running setup.py install for publisher: finished with status 'done'\n",
277-
"Successfully installed publisher-0.11\n"
278-
]
279-
},
280-
{
281-
"name": "stderr",
282-
"output_type": "stream",
283-
"text": [
284-
"C:\\Python27\\lib\\site-packages\\IPython\\nbconvert.py:13: ShimWarning:\n",
285-
"\n",
286-
"The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\n",
287-
"\n",
288-
"C:\\Python27\\lib\\site-packages\\publisher\\publisher.py:53: UserWarning:\n",
289-
"\n",
290-
"Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
291-
"\n"
258+
"Successfully installed publisher-0.11\n",
259+
"\u001b[33mYou are using pip version 10.0.1, however version 18.1 is available.\n",
260+
"You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n"
292261
]
293262
}
294263
],
@@ -325,21 +294,21 @@
325294
"metadata": {
326295
"anaconda-cloud": {},
327296
"kernelspec": {
328-
"display_name": "Python 3",
297+
"display_name": "Python 2",
329298
"language": "python",
330-
"name": "python3"
299+
"name": "python2"
331300
},
332301
"language_info": {
333302
"codemirror_mode": {
334303
"name": "ipython",
335-
"version": 3
304+
"version": 2
336305
},
337306
"file_extension": ".py",
338307
"mimetype": "text/x-python",
339308
"name": "python",
340309
"nbconvert_exporter": "python",
341-
"pygments_lexer": "ipython3",
342-
"version": "3.6.5"
310+
"pygments_lexer": "ipython2",
311+
"version": "2.7.15rc1"
343312
}
344313
},
345314
"nbformat": 4,

0 commit comments

Comments
 (0)