diff --git a/doc/python/axes.md b/doc/python/axes.md index 4a5d495c81d..296f9d15b12 100644 --- a/doc/python/axes.md +++ b/doc/python/axes.md @@ -125,6 +125,19 @@ fig = px.bar(df, x=["Apples", "Oranges"], y=[10,20], color=["Here", "There"], fig.show() ``` +##### Rotate axes in Dash + +[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`. + +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 Dash Enterprise.** + + +```python hide_code=true +from IPython.display import IFrame +snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/' +IFrame(snippet_url + 'axes', width='100%', height=630) +``` + ##### Set axis title text with Graph Objects 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 --git a/doc/python/bar-charts.md b/doc/python/bar-charts.md index 3fc03ebfc76..948628392fa 100644 --- a/doc/python/bar-charts.md +++ b/doc/python/bar-charts.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.2' - jupytext_version: 1.4.2 + jupytext_version: 1.6.0 kernelspec: display_name: Python 3 language: python @@ -85,6 +85,19 @@ fig.show() wide_df ``` +### Bar chart in Dash + +[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`. + +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 Dash Enterprise.** + + +```python hide_code=true +from IPython.display import IFrame +snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/' +IFrame(snippet_url + 'bar-charts', width='100%', height=630) +``` + ### Customize bar chart with Plotly Express The bar plot can be customized using keyword arguments. diff --git a/doc/python/getting-started.md b/doc/python/getting-started.md index cb4e3a40b65..c28dec83baf 100644 --- a/doc/python/getting-started.md +++ b/doc/python/getting-started.md @@ -5,8 +5,8 @@ jupyter: text_representation: extension: .md format_name: markdown - format_version: "1.1" - jupytext_version: 1.1.1 + format_version: '1.2' + jupytext_version: 1.6.0 kernelspec: display_name: Python 3 language: python @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.7.3 + version: 3.7.7 plotly: description: Getting Started with Plotly for Python. has_thumbnail: false @@ -30,8 +30,8 @@ jupyter: page_type: u-guide permalink: python/getting-started/ redirect_from: - - python/getting_started/ - - /python/pytables/ + - python/getting_started/ + - /python/pytables/ --- @@ -80,6 +80,19 @@ fig = go.Figure(data=go.Bar(y=[2, 3, 1])) fig.write_html('first_figure.html', auto_open=True) ``` +### Plotly chart in Dash + +[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`. + +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 Dash Enterprise.** + + +```python hide_code=true +from IPython.display import IFrame +snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/' +IFrame(snippet_url + 'getting-started', width='100%', height=630) +``` + #### Jupyter Notebook Support diff --git a/doc/python/line-and-scatter.md b/doc/python/line-and-scatter.md index ac747a39122..2f94832793d 100644 --- a/doc/python/line-and-scatter.md +++ b/doc/python/line-and-scatter.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.2' - jupytext_version: 1.4.2 + jupytext_version: 1.6.0 kernelspec: display_name: Python 3 language: python @@ -67,6 +67,19 @@ fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species", fig.show() ``` +## Scatter plot in Dash + +[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`. + +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 Dash Enterprise.** + + +```python hide_code=true +from IPython.display import IFrame +snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/' +IFrame(snippet_url + 'line-and-scatter', width='100%', height=630) +``` + ## Line plot with Plotly Express ```python diff --git a/doc/python/line-charts.md b/doc/python/line-charts.md index 86df965a144..5dbbbb94889 100644 --- a/doc/python/line-charts.md +++ b/doc/python/line-charts.md @@ -5,8 +5,8 @@ jupyter: text_representation: extension: .md format_name: markdown - format_version: '1.1' - jupytext_version: 1.1.1 + format_version: '1.2' + jupytext_version: 1.6.0 kernelspec: display_name: Python 3 language: python @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.6.7 + version: 3.7.7 plotly: description: How to make line charts in Python with Plotly. Examples on creating and styling line charts in Python with Plotly. @@ -69,6 +69,19 @@ fig = px.line(df, x="year", y="lifeExp", color="continent", fig.show() ``` +### Line chart in Dash + +[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`. + +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 Dash Enterprise.** + + +```python hide_code=true +from IPython.display import IFrame +snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/' +IFrame(snippet_url + 'line-charts', width='100%', height=630) +``` + ### Sparklines with Plotly Express Sparklines are scatter plots inside subplots, with gridlines, axis lines, and ticks removed. diff --git a/doc/python/plotly-express.md b/doc/python/plotly-express.md index 2fb059279ac..c26c79ab8b8 100644 --- a/doc/python/plotly-express.md +++ b/doc/python/plotly-express.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.2' - jupytext_version: 1.4.2 + jupytext_version: 1.6.0 kernelspec: display_name: Python 3 language: python @@ -72,6 +72,20 @@ The Plotly Express API in general offers the following features: * **Trendlines**: `px.scatter` supports [built-in trendlines with accessible model output](/python/linear-fits/). * **Animations**: many PX functions support [simple animation support via the `animation_frame` and `animation_group` arguments](/python/animations/). + +### Plotly Express in Dash + +[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`. + +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 Dash Enterprise.** + + +```python hide_code=true +from IPython.display import IFrame +snippet_url = 'https://dash-gallery.plotly.host/python-docs-dash-snippets/' +IFrame(snippet_url + 'plotly-express', width='100%', height=630) +``` + ### Gallery 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() fig = px.scatter_ternary(df, a="Joly", b="Coderre", c="Bergeron", color="winner", size="total", hover_name="district", size_max=15, color_discrete_map = {"Joly": "blue", "Bergeron": "green", "Coderre":"red"} ) fig.show() -``` \ No newline at end of file +```