You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h4id="New-to-Plotly?">New to Plotly?<aclass="anchor-link" href="#New-to-Plotly?">¶</a></h4><p>Plotly's Python library is free and open source! <ahref="https://plot.ly/python/getting-started/">Get started</a> by dowloading the client and <ahref="https://plot.ly/python/getting-started/">reading the primer</a>.
22
+
<h4id="New-to-Plotly?">New to Plotly?<aclass="anchor-link" href="#New-to-Plotly?">¶</a></h4><p>Plotly's Python library is free and open source! <ahref="https://plot.ly/python/getting-started/">Get started</a> by dowloading the client and <ahref="https://plot.ly/python/getting-started/">reading the primer</a>.
23
23
<br>You can set up Plotly to work in <ahref="https://plot.ly/python/getting-started/#initialization-for-online-plotting">online</a> or <ahref="https://plot.ly/python/getting-started/#initialization-for-offline-plotting">offline</a> mode, or in <ahref="https://plot.ly/python/getting-started/#start-plotting-online">jupyter notebooks</a>.
24
24
<br>We also have a quick-reference <ahref="https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf">cheatsheet</a> (new!) to help you get started!</p>
25
25
@@ -30,51 +30,16 @@ <h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotl
<h4id="Version-Check">Version Check<aclass="anchor-link" href="#Version-Check">¶</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>
<h4id="Version-Check">Version Check<aclass="anchor-link" href="#Version-Check">¶</a></h4><p>This is documentation for version 2 of plotly.py. See the <ahref="https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#270---2018-05-23">changelog</a> for differences between package versions.</p>
<h4id="Methods">Methods<aclass="anchor-link" href="#Methods">¶</a></h4><p>The <ahref="https://plot.ly/python/reference/#layout-updatemenus-buttons-method">updatemenu method</a> determines which <ahref="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
+
<h4id="Methods">Methods<aclass="anchor-link" href="#Methods">¶</a></h4><p>The <ahref="https://plot.ly/python/reference/#layout-updatemenus-buttons-method">updatemenu method</a> determines which <ahref="https://plot.ly/javascript/plotlyjs-function-reference/">plotly.js function</a> will be used to modify the chart. There are 4 possible methods:</p>
78
43
<ul>
79
44
<li><code>"restyle"</code>: modify data or data attributes</li>
<h4id="Restyle-Button">Restyle Button<aclass="anchor-link" href="#Restyle-Button">¶</a></h4><p>The <code>"restyle"</code> method should be used when modifying the data and data attributes of the graph.<br>
57
+
<h4id="Restyle-Button">Restyle Button<aclass="anchor-link" href="#Restyle-Button">¶</a></h4><p>The <code>"restyle"</code> method should be used when modifying the data and data attributes of the graph.<br>
93
58
<strong>Update One Data Attribute</strong><br>
94
59
This example demonstrates how to update a single data attribute: chart <code>type</code> with the <code>"restyle"</code> method.</p>
<h4id="Relayout-Button">Relayout Button<aclass="anchor-link" href="#Relayout-Button">¶</a></h4><p>The <code>"relayout"</code> method should be used when modifying the layout attributes of the graph.<br>
410
+
<h4id="Relayout-Button">Relayout Button<aclass="anchor-link" href="#Relayout-Button">¶</a></h4><p>The <code>"relayout"</code> method should be used when modifying the layout attributes of the graph.<br>
446
411
<strong>Update One Layout Attribute</strong><br>
447
412
This example demonstrates how to update a layout attribute: chart <code>type</code> with the <code>"relayout"</code> method.</p>
<h4id="Update-Button">Update Button<aclass="anchor-link" href="#Update-Button">¶</a></h4><p>The <code>"update"</code> method should be used when modifying the data and layout sections of the graph.<br>
534
+
<h4id="Update-Button">Update Button<aclass="anchor-link" href="#Update-Button">¶</a></h4><p>The <code>"update"</code> method should be used when modifying the data and layout sections of the graph.<br>
570
535
This example demonstrates how to update which traces are displayed while simulaneously updating layout attributes such as the chart title and annotations.</p>
<h4id="Animate-Button">Animate Button<aclass="anchor-link" href="#Animate-Button">¶</a></h4><p>Refer to our animation docs: <ahref="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
+
<h4id="Animate-Button">Animate Button<aclass="anchor-link" href="#Animate-Button">¶</a></h4><p>Refer to our animation docs: <ahref="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>
<h4id="Style-Buttons">Style Buttons<aclass="anchor-link" href="#Style-Buttons">¶</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: <ahref="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a>.</p>
672
+
<h4id="Style-Buttons">Style Buttons<aclass="anchor-link" href="#Style-Buttons">¶</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: <ahref="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a>.</p>
<h4id="Reference">Reference<aclass="anchor-link" href="#Reference">¶</a></h4><p>See <ahref="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
+
<h4id="Reference">Reference<aclass="anchor-link" href="#Reference">¶</a></h4><p>See <ahref="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a> for more information about <code>updatemenu</code> buttons.</p>
Copy file name to clipboardExpand all lines: _posts/python-version2/controls/buttons/custom-buttons.ipynb
+2-24Lines changed: 2 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -15,29 +15,7 @@
15
15
"metadata": {},
16
16
"source": [
17
17
"#### 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."
<h4id="New-to-Plotly?">New to Plotly?<aclass="anchor-link" href="#New-to-Plotly?">¶</a></h4><p>Plotly's Python library is free and open source! <ahref="https://plot.ly/python/getting-started/">Get started</a> by dowloading the client and <ahref="https://plot.ly/python/getting-started/">reading the primer</a>.
23
+
<h4id="New-to-Plotly?">New to Plotly?<aclass="anchor-link" href="#New-to-Plotly?">¶</a></h4><p>Plotly's Python library is free and open source! <ahref="https://plot.ly/python/getting-started/">Get started</a> by dowloading the client and <ahref="https://plot.ly/python/getting-started/">reading the primer</a>.
24
24
<br>You can set up Plotly to work in <ahref="https://plot.ly/python/getting-started/#initialization-for-online-plotting">online</a> or <ahref="https://plot.ly/python/getting-started/#initialization-for-offline-plotting">offline</a> mode, or in <ahref="https://plot.ly/python/getting-started/#start-plotting-online">jupyter notebooks</a>.
25
25
<br>We also have a quick-reference <ahref="https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf">cheatsheet</a> (new!) to help you get started!</p>
26
26
@@ -31,51 +31,16 @@ <h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotl
<h4id="Version-Check">Version Check<aclass="anchor-link" href="#Version-Check">¶</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>
<h4id="Version-Check">Version Check<aclass="anchor-link" href="#Version-Check">¶</a></h4><p>This is documentation for version 2 of plotly.py. See the <ahref="https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#270---2018-05-23">changelog</a> for differences between package versions.</p>
<h4id="Methods">Methods<aclass="anchor-link" href="#Methods">¶</a></h4><p>The <ahref="https://plot.ly/python/reference/#layout-updatemenus-buttons-method">updatemenu method</a> determines which <ahref="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
+
<h4id="Methods">Methods<aclass="anchor-link" href="#Methods">¶</a></h4><p>The <ahref="https://plot.ly/python/reference/#layout-updatemenus-buttons-method">updatemenu method</a> determines which <ahref="https://plot.ly/javascript/plotlyjs-function-reference/">plotly.js function</a> will be used to modify the chart. There are 4 possible methods:</p>
79
44
<ul>
80
45
<li><code>"restyle"</code>: modify data or data attributes</li>
<h4id="Restyle-Dropdown">Restyle Dropdown<aclass="anchor-link" href="#Restyle-Dropdown">¶</a></h4><p>The <code>"restyle"</code> method should be used when modifying the data and data attributes of the graph.<br>
58
+
<h4id="Restyle-Dropdown">Restyle Dropdown<aclass="anchor-link" href="#Restyle-Dropdown">¶</a></h4><p>The <code>"restyle"</code> method should be used when modifying the data and data attributes of the graph.<br>
94
59
<strong>Update One Data Attribute</strong><br>
95
60
This example demonstrates how to update a single data attribute: chart <code>type</code> with the <code>"restyle"</code> method.</p>
<h4id="Relayout-Dropdown">Relayout Dropdown<aclass="anchor-link" href="#Relayout-Dropdown">¶</a></h4><p>The <code>"relayout"</code> method should be used when modifying the layout attributes of the graph.<br>
408
+
<h4id="Relayout-Dropdown">Relayout Dropdown<aclass="anchor-link" href="#Relayout-Dropdown">¶</a></h4><p>The <code>"relayout"</code> method should be used when modifying the layout attributes of the graph.<br>
444
409
<strong>Update One Layout Attribute</strong><br>
445
410
This example demonstrates how to update a layout attribute: chart <code>type</code> with the <code>"relayout"</code> method.</p>
<h4id="Update-Dropdown">Update Dropdown<aclass="anchor-link" href="#Update-Dropdown">¶</a></h4><p>The <code>"update"</code> method should be used when modifying the data and layout sections of the graph.<br>
531
+
<h4id="Update-Dropdown">Update Dropdown<aclass="anchor-link" href="#Update-Dropdown">¶</a></h4><p>The <code>"update"</code> method should be used when modifying the data and layout sections of the graph.<br>
567
532
This example demonstrates how to update which traces are displayed while simulaneously updating layout attributes such as the chart title and annotations.</p>
<h4id="Style-Dropdown">Style Dropdown<aclass="anchor-link" href="#Style-Dropdown">¶</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: <ahref="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a>.</p>
659
+
<h4id="Style-Dropdown">Style Dropdown<aclass="anchor-link" href="#Style-Dropdown">¶</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: <ahref="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a>.</p>
<h4id="Reference">Reference<aclass="anchor-link" href="#Reference">¶</a></h4><p>See <ahref="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
+
<h4id="Reference">Reference<aclass="anchor-link" href="#Reference">¶</a></h4><p>See <ahref="https://plot.ly/python/reference/#layout-updatemenus">https://plot.ly/python/reference/#layout-updatemenus</a> for more information about <code>updatemenu</code> dropdowns.</p>
0 commit comments