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

Skip to content

Commit 82f8b43

Browse files
committed
make sure style graphs are python 2 compatible and update version check
1 parent 6d435a2 commit 82f8b43

20 files changed

+426
-741
lines changed

_posts/python-version2/style/3d-surface-coloring/2015-06-30-3d_surface_coloring.html

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,28 @@
77
layout: user-guide
88
name: 3D Surface Coloring
99
language: python
10-
version: 2
1110
title: 3D Surface Coloring in Python | plotly
1211
display_as: style_opt
1312
has_thumbnail: true
13+
version: 2
1414
page_type: example_index
1515
order: 7
1616
ipynb: ~notebook_demo/76
1717
---
1818
{% raw %}
19-
<div class="cell border-box-sizing text_cell rendered">
20-
<div class="prompt input_prompt">
19+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
2120
</div>
2221
<div class="inner_cell">
2322
<div class="text_cell_render border-box-sizing rendered_html">
2423
<h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotly?">&#182;</a></h4><p>Plotly's Python library is free and open source! <a href="https://plot.ly/python/getting-started/">Get started</a> by downloading the client and <a href="https://plot.ly/python/getting-started/">reading the primer</a>.
2524
<br>You can set up Plotly to work in <a href="https://plot.ly/python/getting-started/#initialization-for-online-plotting">online</a> or <a href="https://plot.ly/python/getting-started/#initialization-for-offline-plotting">offline</a> mode, or in <a href="https://plot.ly/python/getting-started/#start-plotting-online">jupyter notebooks</a>.
2625
<br>We also have a quick-reference <a href="https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf">cheatsheet</a> (new!) to help you get started!</p>
27-
<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>
28-
29-
</div>
30-
</div>
31-
</div>
32-
<div class="cell border-box-sizing code_cell rendered">
33-
<div class="input">
34-
<div class="prompt input_prompt">In&nbsp;[1]:</div>
35-
<div class="inner_cell">
36-
<div class="input_area">
37-
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly</span>
38-
<span class="n">plotly</span><span class="o">.</span><span class="n">__version__</span>
39-
</pre></div>
40-
41-
</div>
42-
</div>
43-
</div>
44-
45-
<div class="output_wrapper">
46-
<div class="output">
47-
48-
49-
<div class="output_area">
50-
<div class="prompt output_prompt">Out[1]:</div>
51-
52-
53-
54-
<div class="output_text output_subarea output_execute_result">
55-
<pre>&#39;2.0.11&#39;</pre>
56-
</div>
57-
58-
</div>
26+
<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>
5927

6028
</div>
6129
</div>
62-
6330
</div>
64-
<div class="cell border-box-sizing text_cell rendered">
65-
<div class="prompt input_prompt">
31+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
6632
</div>
6733
<div class="inner_cell">
6834
<div class="text_cell_render border-box-sizing rendered_html">
@@ -73,7 +39,7 @@ <h4 id="Color-by-Variable">Color by Variable<a class="anchor-link" href="#Color-
7339
</div>
7440
<div class="cell border-box-sizing code_cell rendered">
7541
<div class="input">
76-
<div class="prompt input_prompt">In&nbsp;[2]:</div>
42+
<div class="prompt input_prompt">In&nbsp;[5]:</div>
7743
<div class="inner_cell">
7844
<div class="input_area">
7945
<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>
@@ -168,8 +134,10 @@ <h4 id="Color-by-Variable">Color by Variable<a class="anchor-link" href="#Color-
168134

169135

170136
<div class="output_area">
137+
171138
<div class="prompt"></div>
172139

140+
173141
<div class="output_subarea output_stream output_stdout output_text">
174142
<pre>This is the format of your plot grid:
175143
[ (1,1) scene1 ] [ (1,2) scene2 ]
@@ -179,11 +147,13 @@ <h4 id="Color-by-Variable">Color by Variable<a class="anchor-link" href="#Color-
179147
</div>
180148

181149
<div class="output_area">
182-
<div class="prompt output_prompt">Out[2]:</div>
150+
151+
<div class="prompt output_prompt">Out[5]:</div>
152+
183153

184154

185155
<div class="output_html rendered_html output_subarea output_execute_result">
186-
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~bdun9/1913.embed" height="800px" width="950px"></iframe>
156+
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~PythonPlotBot/787.embed" height="800px" width="950px"></iframe>
187157
</div>
188158

189159
</div>
@@ -192,17 +162,15 @@ <h4 id="Color-by-Variable">Color by Variable<a class="anchor-link" href="#Color-
192162
</div>
193163

194164
</div>
195-
<div class="cell border-box-sizing text_cell rendered">
196-
<div class="prompt input_prompt">
165+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
197166
</div>
198167
<div class="inner_cell">
199168
<div class="text_cell_render border-box-sizing rendered_html">
200169
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#182;</a></h4>
201170
</div>
202171
</div>
203172
</div>
204-
<div class="cell border-box-sizing text_cell rendered">
205-
<div class="prompt input_prompt">
173+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
206174
</div>
207175
<div class="inner_cell">
208176
<div class="text_cell_render border-box-sizing rendered_html">

_posts/python-version2/style/3d-surface-coloring/3d_surface_coloring.ipynb

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,7 @@
1111
"<br>You can set up Plotly to work in [online](https://plot.ly/python/getting-started/#initialization-for-online-plotting) or [offline](https://plot.ly/python/getting-started/#initialization-for-offline-plotting) mode, or in [jupyter notebooks](https://plot.ly/python/getting-started/#start-plotting-online).\n",
1212
"<br>We also have a quick-reference [cheatsheet](https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf) (new!) to help you get started!\n",
1313
"#### Version Check\n",
14-
"Plotly's python package is updated frequently. Run `pip install plotly --upgrade` to use the latest version. "
15-
]
16-
},
17-
{
18-
"cell_type": "code",
19-
"execution_count": 4,
20-
"metadata": {},
21-
"outputs": [
22-
{
23-
"data": {
24-
"text/plain": [
25-
"'2.0.11'"
26-
]
27-
},
28-
"execution_count": 4,
29-
"metadata": {},
30-
"output_type": "execute_result"
31-
}
32-
],
33-
"source": [
34-
"import plotly\n",
35-
"plotly.__version__"
14+
"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."
3615
]
3716
},
3817
{
@@ -171,7 +150,7 @@
171150
},
172151
{
173152
"cell_type": "code",
174-
"execution_count": 6,
153+
"execution_count": 1,
175154
"metadata": {},
176155
"outputs": [
177156
{
@@ -203,28 +182,18 @@
203182
"output_type": "stream",
204183
"text": [
205184
"Collecting git+https://github.com/plotly/publisher.git\n",
206-
" Cloning https://github.com/plotly/publisher.git to c:\\users\\branden\\appdata\\local\\temp\\pip-ha0jqjeu-build\n",
185+
" Cloning https://github.com/plotly/publisher.git to /tmp/pip-req-build-bgVjxE\n",
186+
"Building wheels for collected packages: publisher\n",
187+
" Running setup.py bdist_wheel for publisher ... \u001b[?25ldone\n",
188+
"\u001b[?25h Stored in directory: /tmp/pip-ephem-wheel-cache-EK4OF4/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n",
189+
"Successfully built publisher\n",
207190
"Installing collected packages: publisher\n",
208-
" Found existing installation: publisher 0.10\n",
209-
" Uninstalling publisher-0.10:\n",
210-
" Successfully uninstalled publisher-0.10\n",
211-
" Running setup.py install for publisher: started\n",
212-
" Running setup.py install for publisher: finished with status 'done'\n",
213-
"Successfully installed publisher-0.10\n"
214-
]
215-
},
216-
{
217-
"name": "stderr",
218-
"output_type": "stream",
219-
"text": [
220-
"C:\\Users\\Branden\\Anaconda3\\envs\\ipykernel_py2\\lib\\site-packages\\IPython\\nbconvert.py:13: ShimWarning:\n",
221-
"\n",
222-
"The `IPython.nbconvert` package has been deprecated. You should import from nbconvert instead.\n",
223-
"\n",
224-
"C:\\Users\\Branden\\Anaconda3\\envs\\ipykernel_py2\\lib\\site-packages\\publisher\\publisher.py:53: UserWarning:\n",
225-
"\n",
226-
"Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
227-
"\n"
191+
" Found existing installation: publisher 0.11\n",
192+
" Uninstalling publisher-0.11:\n",
193+
" Successfully uninstalled publisher-0.11\n",
194+
"Successfully installed publisher-0.11\n",
195+
"\u001b[33mYou are using pip version 10.0.1, however version 18.1 is available.\n",
196+
"You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n"
228197
]
229198
}
230199
],
@@ -275,7 +244,7 @@
275244
"name": "python",
276245
"nbconvert_exporter": "python",
277246
"pygments_lexer": "ipython2",
278-
"version": "2.7.12"
247+
"version": "2.7.15rc1"
279248
}
280249
},
281250
"nbformat": 4,

_posts/python-version2/style/annotations/2015-06-30-text-and-annotations.html

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
thumbnail: thumbnail/annotations.jpg
77
layout: user-guide
88
language: python
9-
version: 2
109
title: Text and Annotations | plotly
1110
display_as: style_opt
1211
has_thumbnail: false
12+
version: 2
1313
page_type: example_index
1414
order: 1
1515
ipynb: ~notebook_demo/204
@@ -19,7 +19,7 @@
1919
</div>
2020
<div class="inner_cell">
2121
<div class="text_cell_render border-box-sizing rendered_html">
22-
<h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotly?">&#194;&#182;</a></h4><p>Plotly's Python library is free and open source! <a href="https://plot.ly/python/getting-started/">Get started</a> by downloading the client and <a href="https://plot.ly/python/getting-started/">reading the primer</a>.
22+
<h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotly?">&#182;</a></h4><p>Plotly's Python library is free and open source! <a href="https://plot.ly/python/getting-started/">Get started</a> by downloading the client and <a href="https://plot.ly/python/getting-started/">reading the primer</a>.
2323
<br>You can set up Plotly to work in <a href="https://plot.ly/python/getting-started/#initialization-for-online-plotting">online</a> or <a href="https://plot.ly/python/getting-started/#initialization-for-offline-plotting">offline</a> mode, or in <a href="https://plot.ly/python/getting-started/#start-plotting-online">jupyter notebooks</a>.
2424
<br>We also have a quick-reference <a href="https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf">cheatsheet</a> (new!) to help you get started!</p>
2525

@@ -30,50 +30,16 @@ <h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotl
3030
</div>
3131
<div class="inner_cell">
3232
<div class="text_cell_render border-box-sizing rendered_html">
33-
<h4 id="Version-Check">Version Check<a class="anchor-link" href="#Version-Check">&#194;&#182;</a></h4><p>Plotly's python package is updated frequently. Run <code>pip install plotly --upgrade</code> to use the latest version.</p>
34-
35-
</div>
36-
</div>
37-
</div>
38-
<div class="cell border-box-sizing code_cell rendered">
39-
<div class="input">
40-
<div class="prompt input_prompt">In&nbsp;[1]:</div>
41-
<div class="inner_cell">
42-
<div class="input_area">
43-
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly</span>
44-
<span class="n">plotly</span><span class="o">.</span><span class="n">__version__</span>
45-
</pre></div>
46-
47-
</div>
48-
</div>
49-
</div>
50-
51-
<div class="output_wrapper">
52-
<div class="output">
53-
54-
55-
<div class="output_area">
56-
57-
<div class="prompt output_prompt">Out[1]:</div>
58-
59-
60-
61-
62-
<div class="output_text output_subarea output_execute_result">
63-
<pre>&#39;2.4.1&#39;</pre>
64-
</div>
65-
66-
</div>
33+
<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>
6734

6835
</div>
6936
</div>
70-
7137
</div>
7238
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
7339
</div>
7440
<div class="inner_cell">
7541
<div class="text_cell_render border-box-sizing rendered_html">
76-
<h3 id="Adding-Text-to-Data-in-Line-and-Scatter-Plots">Adding Text to Data in Line and Scatter Plots<a class="anchor-link" href="#Adding-Text-to-Data-in-Line-and-Scatter-Plots">&#194;&#182;</a></h3>
42+
<h3 id="Adding-Text-to-Data-in-Line-and-Scatter-Plots">Adding Text to Data in Line and Scatter Plots<a class="anchor-link" href="#Adding-Text-to-Data-in-Line-and-Scatter-Plots">&#182;</a></h3>
7743
</div>
7844
</div>
7945
</div>
@@ -150,7 +116,7 @@ <h3 id="Adding-Text-to-Data-in-Line-and-Scatter-Plots">Adding Text to Data in Li
150116
</div>
151117
<div class="inner_cell">
152118
<div class="text_cell_render border-box-sizing rendered_html">
153-
<h3 id="Adding-Hover-Text-to-Data-in-Line-and-Scatter-Plots">Adding Hover Text to Data in Line and Scatter Plots<a class="anchor-link" href="#Adding-Hover-Text-to-Data-in-Line-and-Scatter-Plots">&#194;&#182;</a></h3>
119+
<h3 id="Adding-Hover-Text-to-Data-in-Line-and-Scatter-Plots">Adding Hover Text to Data in Line and Scatter Plots<a class="anchor-link" href="#Adding-Hover-Text-to-Data-in-Line-and-Scatter-Plots">&#182;</a></h3>
154120
</div>
155121
</div>
156122
</div>
@@ -207,7 +173,7 @@ <h3 id="Adding-Hover-Text-to-Data-in-Line-and-Scatter-Plots">Adding Hover Text t
207173
</div>
208174
<div class="inner_cell">
209175
<div class="text_cell_render border-box-sizing rendered_html">
210-
<h3 id="Simple-Annotation">Simple Annotation<a class="anchor-link" href="#Simple-Annotation">&#194;&#182;</a></h3>
176+
<h3 id="Simple-Annotation">Simple Annotation<a class="anchor-link" href="#Simple-Annotation">&#182;</a></h3>
211177
</div>
212178
</div>
213179
</div>
@@ -280,7 +246,7 @@ <h3 id="Simple-Annotation">Simple Annotation<a class="anchor-link" href="#Simple
280246
</div>
281247
<div class="inner_cell">
282248
<div class="text_cell_render border-box-sizing rendered_html">
283-
<h3 id="Multiple-Annotations">Multiple Annotations<a class="anchor-link" href="#Multiple-Annotations">&#194;&#182;</a></h3>
249+
<h3 id="Multiple-Annotations">Multiple Annotations<a class="anchor-link" href="#Multiple-Annotations">&#182;</a></h3>
284250
</div>
285251
</div>
286252
</div>
@@ -364,7 +330,7 @@ <h3 id="Multiple-Annotations">Multiple Annotations<a class="anchor-link" href="#
364330
</div>
365331
<div class="inner_cell">
366332
<div class="text_cell_render border-box-sizing rendered_html">
367-
<h3 id="3D-Annotations">3D Annotations<a class="anchor-link" href="#3D-Annotations">&#194;&#182;</a></h3>
333+
<h3 id="3D-Annotations">3D Annotations<a class="anchor-link" href="#3D-Annotations">&#182;</a></h3>
368334
</div>
369335
</div>
370336
</div>
@@ -493,7 +459,7 @@ <h3 id="3D-Annotations">3D Annotations<a class="anchor-link" href="#3D-Annotatio
493459
</div>
494460
<div class="inner_cell">
495461
<div class="text_cell_render border-box-sizing rendered_html">
496-
<h3 id="Custom-Text-Color-and-Styling">Custom Text Color and Styling<a class="anchor-link" href="#Custom-Text-Color-and-Styling">&#194;&#182;</a></h3>
462+
<h3 id="Custom-Text-Color-and-Styling">Custom Text Color and Styling<a class="anchor-link" href="#Custom-Text-Color-and-Styling">&#182;</a></h3>
497463
</div>
498464
</div>
499465
</div>
@@ -571,7 +537,7 @@ <h3 id="Custom-Text-Color-and-Styling">Custom Text Color and Styling<a class="an
571537
</div>
572538
<div class="inner_cell">
573539
<div class="text_cell_render border-box-sizing rendered_html">
574-
<h3 id="Styling-and-Coloring-Annotations">Styling and Coloring Annotations<a class="anchor-link" href="#Styling-and-Coloring-Annotations">&#194;&#182;</a></h3>
540+
<h3 id="Styling-and-Coloring-Annotations">Styling and Coloring Annotations<a class="anchor-link" href="#Styling-and-Coloring-Annotations">&#182;</a></h3>
575541
</div>
576542
</div>
577543
</div>
@@ -658,7 +624,7 @@ <h3 id="Styling-and-Coloring-Annotations">Styling and Coloring Annotations<a cla
658624
</div>
659625
<div class="inner_cell">
660626
<div class="text_cell_render border-box-sizing rendered_html">
661-
<h3 id="Disabling-Hover-Text">Disabling Hover Text<a class="anchor-link" href="#Disabling-Hover-Text">&#194;&#182;</a></h3>
627+
<h3 id="Disabling-Hover-Text">Disabling Hover Text<a class="anchor-link" href="#Disabling-Hover-Text">&#182;</a></h3>
662628
</div>
663629
</div>
664630
</div>
@@ -708,7 +674,7 @@ <h3 id="Disabling-Hover-Text">Disabling Hover Text<a class="anchor-link" href="#
708674
</div>
709675
<div class="inner_cell">
710676
<div class="text_cell_render border-box-sizing rendered_html">
711-
<h3 id="Text-Font-as-an-Array---Styling-Each-Text-Element">Text Font as an Array - Styling Each Text Element<a class="anchor-link" href="#Text-Font-as-an-Array---Styling-Each-Text-Element">&#194;&#182;</a></h3>
677+
<h3 id="Text-Font-as-an-Array---Styling-Each-Text-Element">Text Font as an Array - Styling Each Text Element<a class="anchor-link" href="#Text-Font-as-an-Array---Styling-Each-Text-Element">&#182;</a></h3>
712678
</div>
713679
</div>
714680
</div>
@@ -788,7 +754,7 @@ <h3 id="Text-Font-as-an-Array---Styling-Each-Text-Element">Text Font as an Array
788754
</div>
789755
<div class="inner_cell">
790756
<div class="text_cell_render border-box-sizing rendered_html">
791-
<h3 id="Adding-Annotations-with-xref-and-yref-as-Paper">Adding Annotations with xref and yref as Paper<a class="anchor-link" href="#Adding-Annotations-with-xref-and-yref-as-Paper">&#194;&#182;</a></h3>
757+
<h3 id="Adding-Annotations-with-xref-and-yref-as-Paper">Adding Annotations with xref and yref as Paper<a class="anchor-link" href="#Adding-Annotations-with-xref-and-yref-as-Paper">&#182;</a></h3>
792758
</div>
793759
</div>
794760
</div>
@@ -879,7 +845,7 @@ <h3 id="Adding-Annotations-with-xref-and-yref-as-Paper">Adding Annotations with
879845
</div>
880846
<div class="inner_cell">
881847
<div class="text_cell_render border-box-sizing rendered_html">
882-
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#194;&#182;</a></h4><p>See <a href="https://plot.ly/python/reference/#layout-annotations">https://plot.ly/python/reference/#layout-annotations</a> for more information and chart attribute options!</p>
848+
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#182;</a></h4><p>See <a href="https://plot.ly/python/reference/#layout-annotations">https://plot.ly/python/reference/#layout-annotations</a> for more information and chart attribute options!</p>
883849

884850
</div>
885851
</div>

0 commit comments

Comments
 (0)