Skip to content

Commit 0cb9cc8

Browse files
doc-prod merge
2 parents d01b9de + c0c4424 commit 0cb9cc8

30 files changed

+726
-673
lines changed

doc/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ all: $(HTML_FILES) $(V3_REDIR_FILES) $(NEXT_REDIR_FILES)
2323

2424
$(IPYNB_DIR)/.mapbox_token: $(MD_DIR)/.mapbox_token
2525
@mkdir -p $(IPYNB_DIR)
26-
cd $(IPYNB_DIR) && ln -s ../../$<
26+
@echo "[symlink] .mapbox_token"
27+
@cd $(IPYNB_DIR) && ln -s ../../$<
2728

2829
$(IPYNB_FILES): $(IPYNB_DIR)/.mapbox_token
2930

3031
$(IPYNB_DIR)/%.ipynb: $(MD_DIR)/%.md
3132
@mkdir -p $(IPYNB_DIR)
3233
@echo "[jupytext] $<"
33-
@cat what_about_dash.md >> $<
34-
@jupytext $< --to notebook --quiet --output $@
34+
@cat $< what_about_dash.md | jupytext --to notebook --quiet --output $@
3535

3636
$(HTML_DIR)/2019-07-03-%.html: $(IPYNB_DIR)/%.ipynb
3737
@mkdir -p $(HTML_DIR)

doc/nb.tpl

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
{%- endblock header-%}
1313

14+
{% block input_group %}
15+
{%- if not cell.metadata.get('hide_code', False) -%}
16+
{{ super() }}
17+
{%- endif -%}
18+
{% endblock input_group %}
1419

1520
{%- block footer %}
1621
{{ super() }}

doc/python/3d-mesh.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.2'
9-
jupytext_version: 1.3.0
9+
jupytext_version: 1.6.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.7.3
23+
version: 3.7.6
2424
plotly:
2525
description: How to make 3D Mesh Plots
2626
display_as: 3d_charts
@@ -68,6 +68,19 @@ fig = go.Figure(data=[go.Mesh3d(x=x, y=y, z=z,
6868
fig.show()
6969
```
7070

71+
### 3D Mesh in Dash
72+
73+
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
74+
75+
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a style="color:red;" href="https://plotly.com/dash/">Dash Enterprise</a>.**
76+
77+
78+
```python hide_code=true
79+
from IPython.display import IFrame
80+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
81+
IFrame(snippet_url + '3d-mesh', width='100%', height=630)
82+
```
83+
7184
### Mesh Tetrahedron
7285

7386
In this example we use the `ì`, `j` and `k` parameters to specify manually the geometry of the triangles of the mesh.
@@ -163,4 +176,4 @@ fig.show()
163176
```
164177

165178
## Reference
166-
See https://plotly.com/python/reference/mesh3d/ for more information and chart attribute options!
179+
See https://plotly.com/python/reference/mesh3d/ for more information and chart attribute options!

doc/python/3d-scatter-plots.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
9-
jupytext_version: 1.1.1
8+
format_version: '1.2'
9+
jupytext_version: 1.6.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.8
23+
version: 3.7.6
2424
plotly:
2525
description: How to make 3D scatter plots in Python with Plotly.
2626
display_as: 3d_charts
@@ -72,6 +72,19 @@ fig = px.scatter_3d(df, x='sepal_length', y='sepal_width', z='petal_width',
7272
fig.update_layout(margin=dict(l=0, r=0, b=0, t=0))
7373
```
7474

75+
#### 3d scatter plots in Dash
76+
77+
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
78+
79+
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a style="color:red;" href="https://plotly.com/dash/">Dash Enterprise</a>.**
80+
81+
82+
```python hide_code=true
83+
from IPython.display import IFrame
84+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
85+
IFrame(snippet_url + '3d-scatter-plots', width='100%', height=630)
86+
```
87+
7588
### 3D Scatter Plot with go.Scatter3d
7689

7790
#### Basic 3D Scatter Plot

doc/python/animations.md

+25-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,22 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: "1.1"
9-
jupytext_version: 1.1.6
8+
format_version: '1.2'
9+
jupytext_version: 1.6.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
1313
name: python3
14+
language_info:
15+
codemirror_mode:
16+
name: ipython
17+
version: 3
18+
file_extension: .py
19+
mimetype: text/x-python
20+
name: python
21+
nbconvert_exporter: python
22+
pygments_lexer: ipython3
23+
version: 3.7.6
1424
plotly:
1525
description: An introduction to creating animations with Plotly in Python.
1626
display_as: animations
@@ -37,6 +47,19 @@ px.scatter(df, x="gdpPercap", y="lifeExp", animation_frame="year", animation_gro
3747
log_x=True, size_max=55, range_x=[100,100000], range_y=[25,90])
3848
```
3949

50+
#### Animated figures in Dash
51+
52+
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
53+
54+
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a style="color:red;" href="https://plotly.com/dash/">Dash Enterprise</a>.**
55+
56+
57+
```python hide_code=true
58+
from IPython.display import IFrame
59+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
60+
IFrame(snippet_url + 'animations', width='100%', height=630)
61+
```
62+
4063
#### Animated Bar Charts with Plotly Express
4164

4265
Note that you should always fix the `y_range` to ensure that your data remains visible throughout the animation.

doc/python/box-plots.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.2'
9-
jupytext_version: 1.3.1
9+
jupytext_version: 1.6.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.8
23+
version: 3.7.6
2424
plotly:
2525
description: How to make Box Plots in Python with Plotly.
2626
display_as: statistical
@@ -60,6 +60,18 @@ fig = px.box(df, x="time", y="total_bill")
6060
fig.show()
6161
```
6262

63+
### Box Plots in Dash
64+
65+
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
66+
67+
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a style="color:red;" href="https://plotly.com/dash/">Dash Enterprise</a>.**
68+
69+
```python hide_code=true
70+
from IPython.display import IFrame
71+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
72+
IFrame(snippet_url + 'box-plots', width='100%', height=630)
73+
```
74+
6375
### Display the underlying data
6476

6577
With the `points` argument, display underlying data points with either all points (`all`), outliers only (`outliers`, default), or none of them (`False`).

doc/python/candlestick-charts.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
9-
jupytext_version: 1.1.1
8+
format_version: '1.2'
9+
jupytext_version: 1.6.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.7
23+
version: 3.7.6
2424
plotly:
2525
description: How to make interactive candlestick charts in Python with Plotly.
2626
Six examples of candlestick charts with Pandas, time series, and yahoo finance
@@ -74,6 +74,19 @@ fig.update_layout(xaxis_rangeslider_visible=False)
7474
fig.show()
7575
```
7676

77+
#### Candlestick in Dash
78+
79+
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
80+
81+
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a style="color:red;" href="https://plotly.com/dash/">Dash Enterprise</a>.**
82+
83+
84+
```python hide_code=true
85+
from IPython.display import IFrame
86+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
87+
IFrame(snippet_url + 'candlestick-charts', width='100%', height=630)
88+
```
89+
7790
#### Adding Customized Text and Annotations
7891

7992
```python
@@ -144,4 +157,4 @@ fig.show()
144157
```
145158

146159
#### Reference
147-
For more information on candlestick attributes, see: https://plotly.com/python/reference/candlestick/
160+
For more information on candlestick attributes, see: https://plotly.com/python/reference/candlestick/

doc/python/choropleth-maps.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.2'
9-
jupytext_version: 1.4.2
9+
jupytext_version: 1.6.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.7.7
23+
version: 3.7.6
2424
plotly:
2525
description: How to make choropleth maps in Python with Plotly.
2626
display_as: maps
@@ -143,6 +143,18 @@ fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
143143
fig.show()
144144
```
145145

146+
### Choropleth maps in Dash
147+
148+
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
149+
150+
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a style="color:red;" href="https://plotly.com/dash/">Dash Enterprise</a>.**
151+
152+
```python hide_code=true
153+
from IPython.display import IFrame
154+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
155+
IFrame(snippet_url + 'choropleth-maps', width='100%', height=630)
156+
```
157+
146158
### Discrete Colors
147159

148160
In addition to [continuous colors](/python/colorscales/), we can [discretely-color](/python/discrete-color/) our choropleth maps by setting `color` to a non-numerical column, like the name of the winner of an election.

doc/python/colorscales.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.2'
9-
jupytext_version: 1.3.1
9+
jupytext_version: 1.6.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.8
23+
version: 3.7.6
2424
plotly:
2525
description: How to set, create and control continous color scales and color bars
2626
in scatter, bar, map and heatmap figures.
@@ -90,6 +90,19 @@ fig = px.scatter(df, x="total_bill", y="tip", color="size",
9090
fig.show()
9191
```
9292

93+
### Colorscales in Dash
94+
95+
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
96+
97+
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a style="color:red;" href="https://plotly.com/dash/">Dash Enterprise</a>.**
98+
99+
100+
```python hide_code=true
101+
from IPython.display import IFrame
102+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
103+
IFrame(snippet_url + 'colorscales', width='100%', height=630)
104+
```
105+
93106
### Color Scales in Plotly Express
94107

95108
By default, [Plotly Express](/python/plotly-express/) will use the color scale from the active [template](/python/templates/)'s `layout.colorscales.sequential` attribute, and the default active template is `plotly` which uses the `Plasma` color scale. You can choose any of the [built-in color scales](/python/builtin-colorscales/), however, or define your own.
@@ -557,4 +570,4 @@ fig.show()
557570

558571
### Reference
559572

560-
See https://plotly.com/python/reference/ for more information and chart attribute options!
573+
See https://plotly.com/python/reference/ for more information and chart attribute options!

doc/python/discrete-color.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.2'
9-
jupytext_version: 1.4.2
9+
jupytext_version: 1.6.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.7.7
23+
version: 3.7.6
2424
plotly:
2525
description: How to use and configure discrete color sequences, also known as
2626
categorical or qualitative color scales.
@@ -99,6 +99,18 @@ fig = px.scatter(df, x="total_bill", y="tip", color="size",
9999
fig.show()
100100
```
101101

102+
### Discrete Colors in Dash
103+
104+
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
105+
106+
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a style="color:red;" href="https://plotly.com/dash/">Dash Enterprise</a>.**
107+
108+
```python hide_code=true
109+
from IPython.display import IFrame
110+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
111+
IFrame(snippet_url + 'discrete-color', width='100%', height=630)
112+
```
113+
102114
### Color Sequences in Plotly Express
103115

104116
By default, Plotly Express will use the color sequence from the active [template](/python/templates/)'s `layout.colorway` attribute, and the default active template is `plotly` which uses the `plotly` color sequence. You can choose any of the following built-in qualitative color sequences from the `px.colors.qualitative` module, however, or define your own.
@@ -240,4 +252,4 @@ This works because just like in `px.colors.qualitative`, all [built-in continuou
240252
import plotly.express as px
241253

242254
print(px.colors.sequential.Plasma)
243-
```
255+
```

0 commit comments

Comments
 (0)