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

Skip to content

Commit 5a50228

Browse files
committed
update version check for controls charts in python/version2
1 parent 8a98b99 commit 5a50228

File tree

8 files changed

+66
-333
lines changed

8 files changed

+66
-333
lines changed

_posts/python-version2/controls/buttons/2015-06-30-custom-buttons.html

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
layout: user-guide
88
name: Custom Buttons
99
language: python
10-
version: 2
1110
title: Custom Buttons | plotly
1211
display_as: controls
1312
has_thumbnail: true
13+
version: 2
1414
page_type: example_index
1515
order: 1
1616
---
@@ -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 dowloading 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 dowloading 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,51 +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>Note: Python Buttons are available in version <b>1.12.12+</b><br>
34-
Run <code>pip install plotly --upgrade</code> to update your Plotly version</p>
35-
36-
</div>
37-
</div>
38-
</div>
39-
<div class="cell border-box-sizing code_cell rendered">
40-
<div class="input">
41-
<div class="prompt input_prompt">In&nbsp;[1]:</div>
42-
<div class="inner_cell">
43-
<div class="input_area">
44-
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly</span>
45-
<span class="n">plotly</span><span class="o">.</span><span class="n">__version__</span>
46-
</pre></div>
47-
48-
</div>
49-
</div>
50-
</div>
51-
52-
<div class="output_wrapper">
53-
<div class="output">
54-
55-
56-
<div class="output_area">
57-
58-
<div class="prompt output_prompt">Out[1]:</div>
59-
60-
61-
62-
63-
<div class="output_text output_subarea output_execute_result">
64-
<pre>&#39;2.0.5&#39;</pre>
65-
</div>
66-
67-
</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>
6834

6935
</div>
7036
</div>
71-
7237
</div>
7338
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
7439
</div>
7540
<div class="inner_cell">
7641
<div class="text_cell_render border-box-sizing rendered_html">
77-
<h4 id="Methods">Methods<a class="anchor-link" href="#Methods">&#194;&#182;</a></h4><p>The <a href="https://plot.ly/python/reference/#layout-updatemenus-buttons-method">updatemenu method</a> determines which <a href="https://plot.ly/javascript/plotlyjs-function-reference/">plotly.js function</a> will be used to modify the chart. There are 4 possible methods:</p>
42+
<h4 id="Methods">Methods<a class="anchor-link" href="#Methods">&#182;</a></h4><p>The <a href="https://plot.ly/python/reference/#layout-updatemenus-buttons-method">updatemenu method</a> determines which <a href="https://plot.ly/javascript/plotlyjs-function-reference/">plotly.js function</a> will be used to modify the chart. There are 4 possible methods:</p>
7843
<ul>
7944
<li><code>"restyle"</code>: modify data or data attributes</li>
8045
<li><code>"relayout"</code>: modify layout attributes</li>
@@ -89,7 +54,7 @@ <h4 id="Methods">Methods<a class="anchor-link" href="#Methods">&#194;&#182;</a><
8954
</div>
9055
<div class="inner_cell">
9156
<div class="text_cell_render border-box-sizing rendered_html">
92-
<h4 id="Restyle-Button">Restyle Button<a class="anchor-link" href="#Restyle-Button">&#194;&#182;</a></h4><p>The <code>"restyle"</code> method should be used when modifying the data and data attributes of the graph.<br>
57+
<h4 id="Restyle-Button">Restyle Button<a class="anchor-link" href="#Restyle-Button">&#182;</a></h4><p>The <code>"restyle"</code> method should be used when modifying the data and data attributes of the graph.<br>
9358
<strong>Update One Data Attribute</strong><br>
9459
This example demonstrates how to update a single data attribute: chart <code>type</code> with the <code>"restyle"</code> method.</p>
9560

@@ -442,7 +407,7 @@ <h4 id="Restyle-Button">Restyle Button<a class="anchor-link" href="#Restyle-Butt
442407
</div>
443408
<div class="inner_cell">
444409
<div class="text_cell_render border-box-sizing rendered_html">
445-
<h4 id="Relayout-Button">Relayout Button<a class="anchor-link" href="#Relayout-Button">&#194;&#182;</a></h4><p>The <code>"relayout"</code> method should be used when modifying the layout attributes of the graph.<br>
410+
<h4 id="Relayout-Button">Relayout Button<a class="anchor-link" href="#Relayout-Button">&#182;</a></h4><p>The <code>"relayout"</code> method should be used when modifying the layout attributes of the graph.<br>
446411
<strong>Update One Layout Attribute</strong><br>
447412
This example demonstrates how to update a layout attribute: chart <code>type</code> with the <code>"relayout"</code> method.</p>
448413

@@ -566,7 +531,7 @@ <h4 id="Relayout-Button">Relayout Button<a class="anchor-link" href="#Relayout-B
566531
</div>
567532
<div class="inner_cell">
568533
<div class="text_cell_render border-box-sizing rendered_html">
569-
<h4 id="Update-Button">Update Button<a class="anchor-link" href="#Update-Button">&#194;&#182;</a></h4><p>The <code>"update"</code> method should be used when modifying the data and layout sections of the graph.<br>
534+
<h4 id="Update-Button">Update Button<a class="anchor-link" href="#Update-Button">&#182;</a></h4><p>The <code>"update"</code> method should be used when modifying the data and layout sections of the graph.<br>
570535
This example demonstrates how to update which traces are displayed while simulaneously updating layout attributes such as the chart title and annotations.</p>
571536

572537
</div>
@@ -695,7 +660,7 @@ <h4 id="Update-Button">Update Button<a class="anchor-link" href="#Update-Button"
695660
</div>
696661
<div class="inner_cell">
697662
<div class="text_cell_render border-box-sizing rendered_html">
698-
<h4 id="Animate-Button">Animate Button<a class="anchor-link" href="#Animate-Button">&#194;&#182;</a></h4><p>Refer to our animation docs: <a href="https://plot.ly/python/#animations">https://plot.ly/python/#animations</a> for examples on how to use the <code>animate</code> method with Plotly buttons.</p>
663+
<h4 id="Animate-Button">Animate Button<a class="anchor-link" href="#Animate-Button">&#182;</a></h4><p>Refer to our animation docs: <a href="https://plot.ly/python/#animations">https://plot.ly/python/#animations</a> for examples on how to use the <code>animate</code> method with Plotly buttons.</p>
699664

700665
</div>
701666
</div>
@@ -704,7 +669,7 @@ <h4 id="Animate-Button">Animate Button<a class="anchor-link" href="#Animate-Butt
704669
</div>
705670
<div class="inner_cell">
706671
<div class="text_cell_render border-box-sizing rendered_html">
707-
<h4 id="Style-Buttons">Style Buttons<a class="anchor-link" href="#Style-Buttons">&#194;&#182;</a></h4><p>When adding buttons to Plotly charts, users have the option of styling the color, font, padding, and position of the buttons. The example below demonstrates how to apply different styling options. See all updatemenu styling attributes here: <a href="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a>.</p>
672+
<h4 id="Style-Buttons">Style Buttons<a class="anchor-link" href="#Style-Buttons">&#182;</a></h4><p>When adding buttons to Plotly charts, users have the option of styling the color, font, padding, and position of the buttons. The example below demonstrates how to apply different styling options. See all updatemenu styling attributes here: <a href="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a>.</p>
708673

709674
</div>
710675
</div>
@@ -893,7 +858,7 @@ <h4 id="Style-Buttons">Style Buttons<a class="anchor-link" href="#Style-Buttons"
893858
</div>
894859
<div class="inner_cell">
895860
<div class="text_cell_render border-box-sizing rendered_html">
896-
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#194;&#182;</a></h4><p>See <a href="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a> for more information about <code>updatemenu</code> buttons.</p>
861+
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#182;</a></h4><p>See <a href="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a> for more information about <code>updatemenu</code> buttons.</p>
897862

898863
</div>
899864
</div>

_posts/python-version2/controls/buttons/custom-buttons.ipynb

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,7 @@
1515
"metadata": {},
1616
"source": [
1717
"#### Version Check\n",
18-
"Note: Python Buttons are available in version <b>1.12.12+</b><br>\n",
19-
"Run `pip install plotly --upgrade` to update your Plotly version"
20-
]
21-
},
22-
{
23-
"cell_type": "code",
24-
"execution_count": 1,
25-
"metadata": {},
26-
"outputs": [
27-
{
28-
"data": {
29-
"text/plain": [
30-
"'2.0.5'"
31-
]
32-
},
33-
"execution_count": 1,
34-
"metadata": {},
35-
"output_type": "execute_result"
36-
}
37-
],
38-
"source": [
39-
"import plotly\n",
40-
"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."
4119
]
4220
},
4321
{
@@ -917,7 +895,7 @@
917895
"name": "python",
918896
"nbconvert_exporter": "python",
919897
"pygments_lexer": "ipython2",
920-
"version": "2.7.12"
898+
"version": "2.7.15rc1"
921899
}
922900
},
923901
"nbformat": 4,

_posts/python-version2/controls/dropdowns/2015-06-30-dropdown.html

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
layout: user-guide
88
name: Dropdown Menus
99
language: python
10-
version: 2
1110
title: Dropdown Menus | plotly
1211
display_as: controls
1312
has_thumbnail: true
13+
version: 2
1414
page_type: example_index
1515
order: 2
1616
ipynb: ~notebook_demo/85
@@ -20,7 +20,7 @@
2020
</div>
2121
<div class="inner_cell">
2222
<div class="text_cell_render border-box-sizing rendered_html">
23-
<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 dowloading the client and <a href="https://plot.ly/python/getting-started/">reading the primer</a>.
23+
<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 dowloading the client and <a href="https://plot.ly/python/getting-started/">reading the primer</a>.
2424
<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>.
2525
<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>
2626

@@ -31,51 +31,16 @@ <h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotl
3131
</div>
3232
<div class="inner_cell">
3333
<div class="text_cell_render border-box-sizing rendered_html">
34-
<h4 id="Version-Check">Version Check<a class="anchor-link" href="#Version-Check">&#194;&#182;</a></h4><p>Note: Python Buttons are available in version <b>1.12.12+</b><br>
35-
Run <code>pip install plotly --upgrade</code> to update your Plotly version</p>
36-
37-
</div>
38-
</div>
39-
</div>
40-
<div class="cell border-box-sizing code_cell rendered">
41-
<div class="input">
42-
<div class="prompt input_prompt">In&nbsp;[7]:</div>
43-
<div class="inner_cell">
44-
<div class="input_area">
45-
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly</span>
46-
<span class="n">plotly</span><span class="o">.</span><span class="n">__version__</span>
47-
</pre></div>
48-
49-
</div>
50-
</div>
51-
</div>
34+
<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>
5235

53-
<div class="output_wrapper">
54-
<div class="output">
55-
56-
57-
<div class="output_area">
58-
59-
<div class="prompt output_prompt">Out[7]:</div>
60-
61-
62-
63-
64-
<div class="output_text output_subarea output_execute_result">
65-
<pre>&#39;2.2.3&#39;</pre>
6636
</div>
67-
6837
</div>
69-
70-
</div>
71-
</div>
72-
7338
</div>
7439
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
7540
</div>
7641
<div class="inner_cell">
7742
<div class="text_cell_render border-box-sizing rendered_html">
78-
<h4 id="Methods">Methods<a class="anchor-link" href="#Methods">&#194;&#182;</a></h4><p>The <a href="https://plot.ly/python/reference/#layout-updatemenus-buttons-method">updatemenu method</a> determines which <a href="https://plot.ly/javascript/plotlyjs-function-reference/">plotly.js function</a> will be used to modify the chart. There are 4 possible methods:</p>
43+
<h4 id="Methods">Methods<a class="anchor-link" href="#Methods">&#182;</a></h4><p>The <a href="https://plot.ly/python/reference/#layout-updatemenus-buttons-method">updatemenu method</a> determines which <a href="https://plot.ly/javascript/plotlyjs-function-reference/">plotly.js function</a> will be used to modify the chart. There are 4 possible methods:</p>
7944
<ul>
8045
<li><code>"restyle"</code>: modify data or data attributes</li>
8146
<li><code>"relayout"</code>: modify layout attributes</li>
@@ -90,7 +55,7 @@ <h4 id="Methods">Methods<a class="anchor-link" href="#Methods">&#194;&#182;</a><
9055
</div>
9156
<div class="inner_cell">
9257
<div class="text_cell_render border-box-sizing rendered_html">
93-
<h4 id="Restyle-Dropdown">Restyle Dropdown<a class="anchor-link" href="#Restyle-Dropdown">&#194;&#182;</a></h4><p>The <code>"restyle"</code> method should be used when modifying the data and data attributes of the graph.<br>
58+
<h4 id="Restyle-Dropdown">Restyle Dropdown<a class="anchor-link" href="#Restyle-Dropdown">&#182;</a></h4><p>The <code>"restyle"</code> method should be used when modifying the data and data attributes of the graph.<br>
9459
<strong>Update One Data Attribute</strong><br>
9560
This example demonstrates how to update a single data attribute: chart <code>type</code> with the <code>"restyle"</code> method.</p>
9661

@@ -440,7 +405,7 @@ <h4 id="Restyle-Dropdown">Restyle Dropdown<a class="anchor-link" href="#Restyle-
440405
</div>
441406
<div class="inner_cell">
442407
<div class="text_cell_render border-box-sizing rendered_html">
443-
<h4 id="Relayout-Dropdown">Relayout Dropdown<a class="anchor-link" href="#Relayout-Dropdown">&#194;&#182;</a></h4><p>The <code>"relayout"</code> method should be used when modifying the layout attributes of the graph.<br>
408+
<h4 id="Relayout-Dropdown">Relayout Dropdown<a class="anchor-link" href="#Relayout-Dropdown">&#182;</a></h4><p>The <code>"relayout"</code> method should be used when modifying the layout attributes of the graph.<br>
444409
<strong>Update One Layout Attribute</strong><br>
445410
This example demonstrates how to update a layout attribute: chart <code>type</code> with the <code>"relayout"</code> method.</p>
446411

@@ -563,7 +528,7 @@ <h4 id="Relayout-Dropdown">Relayout Dropdown<a class="anchor-link" href="#Relayo
563528
</div>
564529
<div class="inner_cell">
565530
<div class="text_cell_render border-box-sizing rendered_html">
566-
<h4 id="Update-Dropdown">Update Dropdown<a class="anchor-link" href="#Update-Dropdown">&#194;&#182;</a></h4><p>The <code>"update"</code> method should be used when modifying the data and layout sections of the graph.<br>
531+
<h4 id="Update-Dropdown">Update Dropdown<a class="anchor-link" href="#Update-Dropdown">&#182;</a></h4><p>The <code>"update"</code> method should be used when modifying the data and layout sections of the graph.<br>
567532
This example demonstrates how to update which traces are displayed while simulaneously updating layout attributes such as the chart title and annotations.</p>
568533

569534
</div>
@@ -691,7 +656,7 @@ <h4 id="Update-Dropdown">Update Dropdown<a class="anchor-link" href="#Update-Dro
691656
</div>
692657
<div class="inner_cell">
693658
<div class="text_cell_render border-box-sizing rendered_html">
694-
<h4 id="Style-Dropdown">Style Dropdown<a class="anchor-link" href="#Style-Dropdown">&#194;&#182;</a></h4><p>When adding dropdowns to Plotly charts, users have the option of styling the color, font, padding, and position of the dropdown menus. The example below demonstrates how to apply different styling options. See all updatemenu styling attributes here: <a href="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a>.</p>
659+
<h4 id="Style-Dropdown">Style Dropdown<a class="anchor-link" href="#Style-Dropdown">&#182;</a></h4><p>When adding dropdowns to Plotly charts, users have the option of styling the color, font, padding, and position of the dropdown menus. The example below demonstrates how to apply different styling options. See all updatemenu styling attributes here: <a href="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a>.</p>
695660

696661
</div>
697662
</div>
@@ -862,7 +827,7 @@ <h4 id="Style-Dropdown">Style Dropdown<a class="anchor-link" href="#Style-Dropdo
862827
</div>
863828
<div class="inner_cell">
864829
<div class="text_cell_render border-box-sizing rendered_html">
865-
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#194;&#182;</a></h4><p>See <a href="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a> for more information about <code>updatemenu</code> dropdowns.</p>
830+
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#182;</a></h4><p>See <a href="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a> for more information about <code>updatemenu</code> dropdowns.</p>
866831

867832
</div>
868833
</div>

0 commit comments

Comments
 (0)