Skip to content

Commit a7e4318

Browse files
Merge branch 'doc-prod'
2 parents fe7a5d5 + d09aa58 commit a7e4318

12 files changed

+175
-31
lines changed

Diff for: doc/python/axes.md

+13
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,19 @@ fig = px.bar(df, x=["Apples", "Oranges"], y=[10,20], color=["Here", "There"],
125125
fig.show()
126126
```
127127

128+
##### Rotate axes in Dash
129+
130+
[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`.
131+
132+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
133+
134+
135+
```python hide_code=true
136+
from IPython.display import IFrame
137+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
138+
IFrame(snippet_url + 'axes', width='100%', height=630)
139+
```
140+
128141
##### Set axis title text with Graph Objects
129142

130143
Axis titles are set using the nested `title.text` property of the x or y axis. Here is an example of creating a new figure and using `update_xaxes` and `update_yaxes`, with magic underscore notation, to set the axis titles.

Diff for: doc/python/bar-charts.md

+14-1
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
@@ -85,6 +85,19 @@ fig.show()
8585
wide_df
8686
```
8787

88+
### Bar chart in Dash
89+
90+
[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`.
91+
92+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
93+
94+
95+
```python hide_code=true
96+
from IPython.display import IFrame
97+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
98+
IFrame(snippet_url + 'bar-charts', width='100%', height=630)
99+
```
100+
88101
### Customize bar chart with Plotly Express
89102

90103
The bar plot can be customized using keyword arguments.

Diff for: doc/python/creating-and-updating-figures.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.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.0
23+
version: 3.7.6
2424
plotly:
2525
description: Creating and Updating Figures with Plotly's Python graphing library
2626
display_as: file_settings
@@ -127,6 +127,19 @@ print("JSON Representation of A Graph Object:\n\n" + str(fig.to_json()))
127127
print("\n\n")
128128
```
129129

130+
### Representing Figures in Dash
131+
132+
[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`.
133+
134+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
135+
136+
137+
```python hide_code=true
138+
from IPython.display import IFrame
139+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
140+
IFrame(snippet_url + 'figure-structure', width='100%', height=630)
141+
```
142+
130143
### Creating Figures
131144

132145
This section summarizes several ways to create new graph object figures with the `plotly.py` graphing library.
@@ -652,4 +665,4 @@ fig.data[0].marker.line.width = 4
652665
fig.data[0].marker.line.color = "black"
653666

654667
fig.show()
655-
```
668+
```

Diff for: doc/python/distplot.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 Distplots in Python with Plotly.
2626
display_as: statistical
@@ -56,6 +56,19 @@ fig = px.histogram(df, x="total_bill", y="tip", color="sex",
5656
fig.show()
5757
```
5858

59+
### Combined statistical representations in Dash
60+
61+
[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`.
62+
63+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
64+
65+
66+
```python hide_code=true
67+
from IPython.display import IFrame
68+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
69+
IFrame(snippet_url + 'distplot', width='100%', height=630)
70+
```
71+
5972
## Combined statistical representations with distplot figure factory
6073

6174
The distplot [figure factory](/python/figure-factories/) displays a combination of statistical representations of numerical data, such as histogram, kernel density estimation or normal curve, and rug plot.
@@ -287,4 +300,4 @@ fig.show()
287300
#### Reference
288301

289302

290-
For more info on `ff.create_distplot()`, see the [full function reference](https://plotly.com/python-api-reference/generated/plotly.figure_factory.create_distplot.html)
303+
For more info on `ff.create_distplot()`, see the [full function reference](https://plotly.com/python-api-reference/generated/plotly.figure_factory.create_distplot.html)

Diff for: doc/python/filled-area-plots.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 filled area plots in Python with Plotly.
2626
display_as: basic
@@ -49,6 +49,19 @@ fig = px.area(df, x="year", y="pop", color="continent",
4949
fig.show()
5050
```
5151

52+
## Filled area plot in Dash
53+
54+
[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`.
55+
56+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
57+
58+
59+
```python hide_code=true
60+
from IPython.display import IFrame
61+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
62+
IFrame(snippet_url + 'filled-area-plots', width='100%', height=630)
63+
```
64+
5265
### Filled area chart with plotly.graph_objects
5366

5467
#### Basic Overlaid Area Chart
@@ -212,4 +225,4 @@ fig.show()
212225

213226
See https://plotly.com/python/reference/scatter/#scatter-line
214227
and https://plotly.com/python/reference/scatter/#scatter-fill
215-
for more information and attribute options!
228+
for more information and attribute options!

Diff for: doc/python/getting-started.md

+19-6
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.7.3
23+
version: 3.7.7
2424
plotly:
2525
description: Getting Started with Plotly for Python.
2626
has_thumbnail: false
@@ -30,8 +30,8 @@ jupyter:
3030
page_type: u-guide
3131
permalink: python/getting-started/
3232
redirect_from:
33-
- python/getting_started/
34-
- /python/pytables/
33+
- python/getting_started/
34+
- /python/pytables/
3535
---
3636

3737
<!-- #region -->
@@ -80,6 +80,19 @@ fig = go.Figure(data=go.Bar(y=[2, 3, 1]))
8080
fig.write_html('first_figure.html', auto_open=True)
8181
```
8282

83+
### Plotly chart in Dash
84+
85+
[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`.
86+
87+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
88+
89+
90+
```python hide_code=true
91+
from IPython.display import IFrame
92+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
93+
IFrame(snippet_url + 'getting-started', width='100%', height=630)
94+
```
95+
8396
<!-- #region -->
8497

8598
#### Jupyter Notebook Support
@@ -174,7 +187,7 @@ fig = go.FigureWidget(data=go.Bar(y=[2, 3, 1]))
174187
fig
175188
```
176189

177-
Please check out our [Troubleshooting guide](/python/troubleshooting/) if you run into any problems with JupyterLab.
190+
Please check out our [Troubleshooting guide](/python/troubleshooting/) if you run into any problems with JupyterLab, particularly if you are using multiple python environments inside Jupyter.
178191

179192
<!-- #region -->
180193

Diff for: doc/python/line-and-scatter.md

+14-1
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
@@ -67,6 +67,19 @@ fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
6767
fig.show()
6868
```
6969

70+
## Scatter plot in Dash
71+
72+
[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`.
73+
74+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
75+
76+
77+
```python hide_code=true
78+
from IPython.display import IFrame
79+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
80+
IFrame(snippet_url + 'line-and-scatter', width='100%', height=630)
81+
```
82+
7083
## Line plot with Plotly Express
7184

7285
```python

Diff for: doc/python/line-charts.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.7
23+
version: 3.7.7
2424
plotly:
2525
description: How to make line charts in Python with Plotly. Examples on creating
2626
and styling line charts in Python with Plotly.
@@ -69,6 +69,19 @@ fig = px.line(df, x="year", y="lifeExp", color="continent",
6969
fig.show()
7070
```
7171

72+
### Line chart in Dash
73+
74+
[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`.
75+
76+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
77+
78+
79+
```python hide_code=true
80+
from IPython.display import IFrame
81+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
82+
IFrame(snippet_url + 'line-charts', width='100%', height=630)
83+
```
84+
7285
### Sparklines with Plotly Express
7386

7487
Sparklines are scatter plots inside subplots, with gridlines, axis lines, and ticks removed.

Diff for: doc/python/ml-regression.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.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: Visualize regression in scikit-learn with Plotly.
2626
display_as: ai_ml
@@ -91,6 +91,19 @@ fig.add_traces(go.Scatter(x=x_range, y=y_range, name='Regression Fit'))
9191
fig.show()
9292
```
9393

94+
### ML Regression in Dash
95+
96+
[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`.
97+
98+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
99+
100+
101+
```python hide_code=true
102+
from IPython.display import IFrame
103+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
104+
IFrame(snippet_url + 'ml-regression', width='100%', height=630)
105+
```
106+
94107
## Model generalization on unseen data
95108

96109
With `go.Scatter`, you can easily color your plot based on a predefined data split. By coloring the training and the testing data points with different colors, you can easily see if whether the model generalizes well to the test data or not.
@@ -534,4 +547,4 @@ Learn more about the Machine Learning models used in this tutorial:
534547
Other tutorials that inspired this notebook:
535548
* https://seaborn.pydata.org/examples/residplot.html
536549
* https://scikit-learn.org/stable/auto_examples/linear_model/plot_lasso_model_selection.html
537-
* http://www.scikit-yb.org/zh/latest/api/regressor/peplot.html
550+
* http://www.scikit-yb.org/zh/latest/api/regressor/peplot.html

Diff for: doc/python/plotly-express.md

+16-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
@@ -72,6 +72,20 @@ The Plotly Express API in general offers the following features:
7272
* **Trendlines**: `px.scatter` supports [built-in trendlines with accessible model output](/python/linear-fits/).
7373
* **Animations**: many PX functions support [simple animation support via the `animation_frame` and `animation_group` arguments](/python/animations/).
7474

75+
76+
### Plotly Express in Dash
77+
78+
[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`.
79+
80+
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 class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**
81+
82+
83+
```python hide_code=true
84+
from IPython.display import IFrame
85+
snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/'
86+
IFrame(snippet_url + 'plotly-express', width='100%', height=630)
87+
```
88+
7589
### Gallery
7690

7791
The following set of figures is just a sampling of what can be done with Plotly Express.
@@ -416,4 +430,4 @@ df = px.data.election()
416430
fig = px.scatter_ternary(df, a="Joly", b="Coderre", c="Bergeron", color="winner", size="total", hover_name="district",
417431
size_max=15, color_discrete_map = {"Joly": "blue", "Bergeron": "green", "Coderre":"red"} )
418432
fig.show()
419-
```
433+
```

0 commit comments

Comments
 (0)