Skip to content

Update doc-prod docs with new release docs #4321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 79 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
6d38c8c
Fix typo in marker-style.md
shaido987 Sep 9, 2021
580c5e6
Update 3d-scatter-plots.md
farzinghanbari Oct 12, 2021
ddba96e
Update what_about_dash.md
LiamConnors Aug 16, 2022
ae378e9
Improve syntax and consistency
sdidier-dev Aug 20, 2022
737e466
Merge branch 'master' into update-dash-imports
LiamConnors Apr 14, 2023
1c1d63b
Fixed a typo in figure-factory-subplots.md
RyanDoesMath May 22, 2023
e604d07
Merge branch 'master' into doc-typo_fix
LiamConnors Jun 5, 2023
b4a3565
Merge pull request #4239 from plotly/master
LiamConnors Jun 8, 2023
2bc52ab
Merge branch 'master' into doc-typo_fix
LiamConnors Jun 9, 2023
886d57a
Merge branch 'doc-prod' into doc-typo_fix
LiamConnors Jun 9, 2023
06bba66
Merge branch 'doc-prod' into update-dash-imports
LiamConnors Jun 9, 2023
b9846f5
Merge pull request #3861 from sdidier-dev/doc-configuration-options-p…
LiamConnors Jun 9, 2023
aae423f
Merge pull request #4218 from RyanDoesMath/doc-typo_fix
LiamConnors Jun 9, 2023
3c0ccde
Merge pull request #3856 from plotly/update-dash-imports
LiamConnors Jun 12, 2023
927c756
Merge branch 'doc-prod' into update-docs
LiamConnors Jun 12, 2023
dc2453e
Update legend.md
LiamConnors Jun 12, 2023
eda9231
Merge branch 'doc-prod' into patch-1
LiamConnors Jun 12, 2023
50a2948
Update colorscales.md
LiamConnors Jun 12, 2023
a3d540d
Update shapes.md
LiamConnors Jun 12, 2023
0b64901
Merge pull request #3423 from farzinghanbari/update-docs
LiamConnors Jun 12, 2023
21e99b7
Merge branch 'doc-prod' into update-5-15-examples
LiamConnors Jun 12, 2023
413d41e
perf: fix pandas PerformanceWarning caused due to `frame.insert`
legendof-selda Jun 12, 2023
fbfd4a8
chore: fix flake8 and black maxlen not match
legendof-selda Jun 12, 2023
3a4b466
Revert "perf: fix pandas PerformanceWarning caused due to `frame.inse…
legendof-selda Jun 12, 2023
f028571
perf: fix pandas PerformanceWarning caused due to `frame.insert`
legendof-selda Jun 12, 2023
d4955b1
refactor: reuse to_unindexed_series
legendof-selda Jun 13, 2023
755069f
Merge pull request #3374 from shaido987/patch-1
LiamConnors Jun 14, 2023
f150ff2
Update lines-on-mapbox.md
LiamConnors Jun 14, 2023
2130c10
Update parallel-categories-diagram.md
LiamConnors Jun 14, 2023
57be35c
Update axes.md
LiamConnors Jun 14, 2023
7c719a6
Merge pull request #4248 from plotly/update-links
LiamConnors Jun 14, 2023
8e48b63
Update shapes.md
LiamConnors Jun 16, 2023
d83c369
Update legend.md
LiamConnors Jun 19, 2023
f2840a3
Merge branch 'doc-prod' into update-5-15-examples
LiamConnors Jun 21, 2023
947cbb1
Merge pull request #4245 from plotly/update-5-15-examples
LiamConnors Jun 21, 2023
940f25b
Merge branch 'master' into fix/pd_perf_issue
legendof-selda Jun 21, 2023
25662fa
Update map-configuration.md
LiamConnors Jul 11, 2023
7b4f835
Merge pull request #4275 from plotly/update-projections
LiamConnors Jul 11, 2023
5f8d9c2
Update treemaps.md
AtharvaKatre Jul 13, 2023
43ff7c1
Merge pull request #4277 from AtharvaKatre/patch-1
LiamConnors Jul 13, 2023
d12dc1f
only interchange necessary columns
MarcoGorelli Jul 19, 2023
2741606
Merge branch 'master' into dont-convert-everything
MarcoGorelli Jul 19, 2023
78ead34
fallback if no select_columns_by_name is present
MarcoGorelli Jul 20, 2023
fa1962a
Merge branch 'dont-convert-everything' of github.com:MarcoGorelli/plo…
MarcoGorelli Jul 20, 2023
f189576
include dataframe interchange PRs in changelog
alexcjohnson Jul 20, 2023
3ae3ea9
Merge branch 'master' into doc-prod
LiamConnors Jul 21, 2023
da860db
Merge pull request #4290 from plotly/doc-prod
LiamConnors Jul 21, 2023
e430257
Merge pull request #4286 from MarcoGorelli/dont-convert-everything
alexcjohnson Jul 21, 2023
b729e33
Update shapes.md
LiamConnors Jul 24, 2023
4725913
update with details on shapes in legends
LiamConnors Jul 24, 2023
d3a4958
Update legend.md
LiamConnors Jul 24, 2023
97b214e
ci: add test for perf warning
legendof-selda Jul 25, 2023
f1ed3d7
Merge branch 'master' into fix/pd_perf_issue
alexcjohnson Jul 25, 2023
e670c4b
Merge pull request #4246 from legendof-selda/fix/pd_perf_issue
alexcjohnson Jul 25, 2023
2a456e0
Update doc/python/legend.md
LiamConnors Jul 25, 2023
aded536
update Plotly.js version - 2.25.0
LiamConnors Jul 25, 2023
56c53b3
Merge branch 'master' into next-release-docs
LiamConnors Jul 25, 2023
c52b686
Update legend.md
LiamConnors Jul 25, 2023
cafddea
Merge branch 'next-release-docs' of github.com:plotly/plotly.py into …
LiamConnors Jul 25, 2023
50766f2
Update px-arguments.md
LiamConnors Jul 25, 2023
b6fce18
Update _core.py
LiamConnors Jul 27, 2023
baf9569
Update CHANGELOG.md
LiamConnors Jul 27, 2023
62d864b
Update CHANGELOG.md
LiamConnors Jul 28, 2023
9978e3e
fix check for to_pandas and toPandas
LiamConnors Jul 28, 2023
d5a7531
add support for to_pandas_df
LiamConnors Jul 31, 2023
9b03201
Update CHANGELOG.md
LiamConnors Aug 1, 2023
2a409f1
Update _core.py
LiamConnors Aug 2, 2023
00813b7
Merge pull request #4300 from plotly/toPandas-support
LiamConnors Aug 9, 2023
7348301
Merge branch 'master' into next-release-docs
LiamConnors Aug 10, 2023
8145d6c
Update plotly.js version
LiamConnors Aug 10, 2023
b8128e4
Update px-arguments.md
LiamConnors Aug 10, 2023
fa35f17
update plotly.js version to 2.25.2
LiamConnors Aug 11, 2023
7bee2d6
Update px-arguments.md
LiamConnors Aug 11, 2023
ee1279a
Merge pull request #4294 from plotly/next-release-docs
LiamConnors Aug 11, 2023
01c6450
version changes for v5.16.0
LiamConnors Aug 11, 2023
982b92f
Merge pull request #4319 from plotly/release-5.16.0
LiamConnors Aug 11, 2023
868fed3
update version for docs
LiamConnors Aug 11, 2023
26ab18f
Merge pull request #4320 from plotly/update-docs
LiamConnors Aug 11, 2023
feb50c9
Merge branch 'doc-prod' into update-production-docs
LiamConnors Aug 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 88
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).


## UNRELEASED
## [5.16.0] - 2023-08-11

### Updated
- Updated Plotly.js from version 2.24.1 to version 2.24.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2242----2023-06-09) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module.
- Updated Plotly.js from version 2.24.1 to version 2.25.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2252----2023-08-11) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
- Add "Equal Earth" projection to geo subplots [[#6670](https://github.com/plotly/plotly.js/pull/6670)],
with thanks to @apparebit for the contribution!
- Add options to include legends for shapes and `newshape` [[#6653](https://github.com/plotly/plotly.js/pull/6653)]
- `px` methods now accept data-frame-like objects that support a [dataframe interchange protocol](https://data-apis.org/dataframe-protocol/latest/index.html), such as polars, vaex, modin etc. This protocol has priority on `to_pandas` call, but will only be used if pandas>=2.0.2 is installed in the environment.
- `px` methods now accept data-frame-like objects that support a `toPandas()` method, such as Spark DataFrames, or a `to_pandas_df()` method, such as Vaex DataFrames.

### Fixed
- Fixed Pandas performance warning issue caused by multiple `frame.insert` [[#4246](https://github.com/plotly/plotly.py/pull/4246)]

## [5.15.0] - 2023-06-08

Expand All @@ -23,7 +30,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
this feature was anonymously sponsored: thank you to our sponsor!
- Add `legend.xref` and `legend.yref` to enable container-referenced positioning of legends [[#6589](https://github.com/plotly/plotly.js/pull/6589)], with thanks to [Gamma Technologies](https://www.gtisoft.com/) for sponsoring the related development.
- Add `colorbar.xref` and `colorbar.yref` to enable container-referenced positioning of colorbars [[#6593](https://github.com/plotly/plotly.js/pull/6593)], with thanks to [Gamma Technologies](https://www.gtisoft.com/) for sponsoring the related development.
- `px` methods now accept data-frame-like objects that support a `to_pandas()` method, such as polars, cudf, vaex etc
- `px` methods now accept data-frame-like objects that support a `to_pandas()` method, such as polars, cudf, vaex etc [[#4244](https://github.com/plotly/plotly.py/pull/4244)], [[#4286](https://github.com/plotly/plotly.py/pull/4286)]

### Fixed
- Fixed another compatibility issue with Pandas 2.0, just affecting `px.*(line_close=True)` [[#4190](https://github.com/plotly/plotly.py/pull/4190)]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

## Quickstart

`pip install plotly==5.15.0`
`pip install plotly==5.16.0`

Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`):

Expand Down Expand Up @@ -78,13 +78,13 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
plotly.py may be installed using pip...

```
pip install plotly==5.15.0
pip install plotly==5.16.0
```

or conda.

```
conda install -c plotly plotly=5.15.0
conda install -c plotly plotly=5.16.0
```

### JupyterLab Support
Expand All @@ -106,7 +106,7 @@ The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**,

```
# JupyterLab 2.x renderer support
jupyter labextension install jupyterlab-plotly@5.15.0 @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyterlab-plotly@5.16.0 @jupyter-widgets/jupyterlab-manager
```

Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
Expand Down
2 changes: 1 addition & 1 deletion binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jupytext
plotly==5.15.0
plotly==5.16.0
jupyter
notebook
pandas==1.0.3
Expand Down
2 changes: 1 addition & 1 deletion doc/apidoc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# The short X.Y version
version = ""
# The full version, including alpha/beta/rc tags
release = "5.15.0"
release = "5.16.0"


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions doc/python/axes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jupyter:
thumbnail: thumbnail/axes.png
---

This tutorial explain how to set the properties of [2-dimensional Cartesian axes](/python/figure-structure/#2d-cartesian-trace-types-and-subplots), namely [`go.layout.XAxis`](/python/reference/layout/xaxis/) and [`go.layout.YAxis`](python/reference/layout/xaxis/).
This tutorial explain how to set the properties of [2-dimensional Cartesian axes](/python/figure-structure/#2d-cartesian-trace-types-and-subplots), namely [`go.layout.XAxis`](/python/reference/layout/xaxis/) and [`go.layout.YAxis`](/python/reference/layout/xaxis/).

Other kinds of subplots and axes are described in other tutorials:

Expand Down Expand Up @@ -154,7 +154,7 @@ fig.update_yaxes(ticklabelposition="inside top", title=None)
fig.show()
```

#### Specifying Label Aliases
#### Specifying Label Aliases

*New in 5.14*

Expand Down
4 changes: 2 additions & 2 deletions doc/python/colorscales.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jupyter:
extension: .md
format_name: markdown
format_version: '1.3'
jupytext_version: 1.14.5
jupytext_version: 1.14.6
kernelspec:
display_name: Python 3 (ipykernel)
language: python
Expand All @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.10.11
version: 3.10.8
plotly:
description: How to set, create and control continuous color scales and color
bars in scatter, bar, map and heatmap figures.
Expand Down
6 changes: 3 additions & 3 deletions doc/python/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ We also encourage you to join the [Plotly Community Forum](http://community.plot
`plotly` may be installed using `pip`:

```
$ pip install plotly==5.15.0
$ pip install plotly==5.16.0
```

or `conda`:

```
$ conda install -c plotly plotly=5.15.0
$ conda install -c plotly plotly=5.16.0
```
This package contains everything you need to write figures to standalone HTML files.

Expand Down Expand Up @@ -152,7 +152,7 @@ The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**,

```
# JupyterLab 2.x renderer support
jupyter labextension install jupyterlab-plotly@5.15.0 @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyterlab-plotly@5.16.0 @jupyter-widgets/jupyterlab-manager
```

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.
Expand Down
98 changes: 85 additions & 13 deletions doc/python/legend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jupyter:
extension: .md
format_name: markdown
format_version: '1.3'
jupytext_version: 1.14.6
jupytext_version: 1.14.7
kernelspec:
display_name: Python 3 (ipykernel)
language: python
Expand All @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.10.11
version: 3.10.4
plotly:
description: How to configure and style the legend in Plotly with Python.
display_as: file_settings
Expand All @@ -35,7 +35,7 @@ jupyter:

### Trace Types, Legends and Color Bars

[Traces](/python/figure-structure) of most types can be optionally associated with a single legend item in the [legend](/python/legend/). Whether or not a given trace appears in the legend is controlled via the `showlegend` attribute. Traces which are their own subplots (see above) do not support this, with the exception of traces of type `pie` and `funnelarea` for which every distinct color represented in the trace gets a separate legend item. Users may show or hide traces by clicking or double-clicking on their associated legend item. Traces that support legend items also support the `legendgroup` attribute, and all traces with the same legend group are treated the same way during click/double-click interactions.
[Traces](/python/figure-structure) of most types and shapes can be optionally associated with a single legend item in the [legend](/python/legend/). Whether or not a given trace or shape appears in the legend is controlled via the `showlegend` attribute. Traces which are their own subplots (see above) do not support this, with the exception of traces of type `pie` and `funnelarea` for which every distinct color represented in the trace gets a separate legend item. Users may show or hide traces by clicking or double-clicking on their associated legend item. Traces that support legend items and shapes also support the `legendgroup` attribute, and all traces and shapes with the same legend group are treated the same way during click/double-click interactions.

The fact that legend items are linked to traces means that when using [discrete color](/python/discrete-color/), a figure must have one trace per color in order to get a meaningful legend. [Plotly Express has robust support for discrete color](/python/discrete-color/) to make this easy.

Expand Down Expand Up @@ -97,26 +97,66 @@ fig.add_trace(go.Bar(name="fourth", x=["a", "b"], y=[2,1]))
fig.show()
```

*New in v5.0*
*New in 5.16*

The `legendrank` attribute of a trace can be used to control its placement within the legend, without regard for its placement in the `data` list.
If you have shapes that are configured to appear in a legend, these are displayed after all traces:

The default `legendrank` for traces is 1000 and ties are broken as described above, meaning that any trace can be pulled up to the top if it is the only one with a legend rank less than 1000 and pushed to the bottom if it is the only one with a rank greater than 1000.
```python
import plotly.graph_objects as go

fig = go.Figure()
fig.add_trace(go.Bar(name="first", x=["a", "b"], y=[1, 2]))
fig.add_trace(go.Bar(name="second", x=["a", "b"], y=[2, 1]))
fig.add_shape(
name="first shape",
showlegend=True,
type="rect",
xref="paper",
line=dict(dash="dash"),
x0=0.85,
x1=0.95,
y0=0,
y1=1.5,
)
fig.add_trace(go.Bar(name="third", x=["a", "b"], y=[1, 2]))
fig.add_trace(go.Bar(name="fourth", x=["a", "b"], y=[2, 1]))

fig.show()

```

The `legendrank` attribute of a trace or shape can be used to control its placement in the legend.
The default `legendrank` for traces and shapes is 1000. When all traces and shapes have the same `legendrank`, traces appear in the order they appear in the data, followed by shapes in the order they are defined.

Any trace or shape can be pulled up to the top of the legend if it is the only one with a legend rank less than 1000 and pushed to the bottom if it is the only one with a rank greater than 1000.

In this example, we add a `legendrank` for each trace and shape, giving the shape the lowest rank so it appears first, and moving the first trace defined to the bottom of the legend by giving it the highest rank.

```python
import plotly.graph_objects as go

fig = go.Figure()
fig.add_trace(go.Bar(name="fourth", x=["a", "b"], y=[2,1], legendrank=4))
fig.add_trace(go.Bar(name="second", x=["a", "b"], y=[2,1], legendrank=2))
fig.add_trace(go.Bar(name="first", x=["a", "b"], y=[1,2], legendrank=1))
fig.add_trace(go.Bar(name="fourth", x=["a", "b"], y=[2,1], legendrank=5))
fig.add_trace(go.Bar(name="second", x=["a", "b"], y=[2,1], legendrank=4))
fig.add_trace(go.Bar(name="first", x=["a", "b"], y=[1,2], legendrank=2))
fig.add_trace(go.Bar(name="third", x=["a", "b"], y=[1,2], legendrank=3))
fig.add_shape(
legendrank=1,
showlegend=True,
type="line",
xref="paper",
line=dict(dash="5px"),
x0=0.05,
x1=0.45,
y0=1.5,
y1=1.5,
)
fig.show()
```

#### Showing and Hiding the Legend

By default the legend is displayed on Plotly charts with multiple traces, and this can be explicitly set with the `layout.showlegend` attribute:
By default the legend is displayed on Plotly charts with multiple traces, and this can be explicitly set with the `layout.showlegend` attribute.

```python
import plotly.express as px
Expand Down Expand Up @@ -253,7 +293,30 @@ When creating figures using [graph objects](/python/graph-objects/) without usin

#### Legend Item Names

Legend items appear per trace, and the legend item name is taken from the trace's `name` attribute.
For traces, legend items appear per trace, and the legend item name is taken from the trace's `name` attribute.

```python
import plotly.graph_objects as go

fig = go.Figure()

fig.add_trace(go.Scatter(
x=[1, 2, 3, 4, 5],
y=[1, 2, 3, 4, 5],
name="Positive"
))

fig.add_trace(go.Scatter(
x=[1, 2, 3, 4, 5],
y=[5, 4, 3, 2, 1],
name="Negative"
))

fig.show()
```

By default, for shapes, legend items are disabled. Set `showlegend=True` on a shape for it to display a legend item.
The name that appears for the shape in the legend is the shape's `name` if it is provided. If no `name` is provided, the shape label's `text` is used. If neither is provided, the legend item appears as "shape \<shape number>". For example, "shape 1".

```python
import plotly.graph_objects as go
Expand All @@ -272,6 +335,15 @@ fig.add_trace(go.Scatter(
name="Negative"
))

fig.add_shape(
showlegend=True,
type="rect",
x0=2,
x1=4,
y0=4.5,
y1=5,
)

fig.show()
```

Expand Down Expand Up @@ -324,7 +396,7 @@ fig.show()

#### Hiding the Trace Initially

Traces have a `visible` attribute. If set to `legendonly`, the trace is hidden from the graph implicitly. Click on the name in the legend to display the hidden trace.
Traces and shapes have a `visible` attribute. If set to `legendonly`, the trace or shape is hidden from the graph implicitly. Click on the name in the legend to display the hidden trace or shape.

```python
import plotly.graph_objects as go
Expand Down Expand Up @@ -578,7 +650,7 @@ fig.show()

*New in 5.15*

By default, all traces appear on one legend. To have multiple legends, specify an alternative legend for a trace using the `legend` property. For a second legend, set `legend="legend2"`. Specify more legends with `legend="legend3"`, `legend="legend4"` and so on.
By default, all traces and shapes appear on one legend. To have multiple legends, specify an alternative legend for a trace or shape using the `legend` property. For a second legend, set `legend="legend2"`. Specify more legends with `legend="legend3"`, `legend="legend4"` and so on.

In this example, the last two scatter traces display on the second legend, "legend2". On the figure's layout, we then position and style each legend.

Expand Down
4 changes: 2 additions & 2 deletions doc/python/lines-on-mapbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jupyter:

To plot on Mapbox maps with Plotly you _may_ need a Mapbox account and a public [Mapbox Access Token](https://www.mapbox.com/studio). See our [Mapbox Map Layers](/python/mapbox-layers/) documentation for more information.

To draw a line on your map, you either can use [`px.line_mapbox()`](https://www.plotly.express/plotly_express/#plotly_express.line_mapbox) in Plotly Express, or [`Scattermapbox`](https://plotly.com/python/reference/scattermapbox/) traces. Below we show you how to draw a line on Mapbox using Plotly Express.
To draw a line on your map, you either can use [`px.line_mapbox()`](https://plotly.com/python-api-reference/generated/plotly.express.line_mapbox.html) in Plotly Express, or [`Scattermapbox`](https://plotly.com/python/reference/scattermapbox/) traces. Below we show you how to draw a line on Mapbox using Plotly Express.

### Lines on Mapbox maps using Plotly Express

Expand Down Expand Up @@ -132,5 +132,5 @@ fig.show()

#### Reference

See [function reference for `px.(line_mapbox)`](https://plotly.com/python-api-reference/generated/plotly.express.line_mapbox) or
See [function reference for `px.(line_mapbox)`](https://plotly.com/python-api-reference/generated/plotly.express.line_mapbox) or
https://plotly.com/python/reference/scattermapbox/ for more information about mapbox and their attribute options.
4 changes: 2 additions & 2 deletions doc/python/parallel-categories-diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For other representations of multivariate data, also see [parallel coordinates](

This example visualizes the restaurant bills of a sample of 244 people. Hovering over a category rectangle (sex, smoker, etc) displays a tooltip with the number of people with that single trait. Hovering over a ribbon in the diagram displays a tooltip with the number of people with a particular combination of the five traits connected by the ribbon.

By default, `px.parallel_categories` will display any column in the `data_frame` that has a cardinality (or number of unique values) of less than 50. This can be overridden either by passing in a specific list of columns to `dimensions` or by setting `dimensions_max_cardinality` to something other than 50.
By default, `px.parallel_categories` will display any column in the `data_frame` that has a cardinality (or number of unique values) of less than 50. This can be overridden either by passing in a specific list of columns to `dimensions` or by setting `dimensions_max_cardinality` to something other than 50.

```python
import plotly.express as px
Expand All @@ -58,7 +58,7 @@ fig.show()

#### Style Diagram

In this example `dimensions` represents a list of stings or the columns of data frame, and `labels` is a dictionary with string keys (column name) and string values ('desired label to be displayed'). See [Plotly express reference page](https://www.plotly.express/plotly_express/#plotly_express.parallel_categories) for more information.
In this example `dimensions` represents a list of stings or the columns of data frame, and `labels` is a dictionary with string keys (column name) and string values ('desired label to be displayed'). See [Plotly express reference page](https://plotly.com/python-api-reference/generated/plotly.express.parallel_categories) for more information.

```python
import plotly.express as px
Expand Down
9 changes: 8 additions & 1 deletion doc/python/px-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fig.show()

### Input Data as Non-Pandas `DataFrame`s

**New in 5.15**
*New in 5.15*

In the examples above, we've used Pandas DataFrames. You can also provide another type of DataFrame to the `data_frame` argument if that DataFrame has a `to_pandas` method, for example, a [Polars](https://www.pola.rs/) DataFrame.

Expand All @@ -196,6 +196,13 @@ fig = px.bar(wide_df, x="nation", y=["gold", "silver", "bronze"], title="Wide-Fo
fig.show()
```

*New in 5.16*

As of version 5.16, you can also provide another type of DataFrame to the `data_frame` argument if that DataFrame supports the [Python dataframe interchange protocol](https://data-apis.org/dataframe-protocol/latest/index.html), or has a `toPandas` or `to_pandas_df` method.

Even if the DataFrame that you are using supports the Python dataframe interchange protocol, you'll need to have Pandas version 2.0.3 or later installed. If you are using an earlier version of Pandas, Plotly Express will look for a `to_pandas`, `toPandas`, and `to_pandas_df` method, and use whichever one is available.


### Input Data as array-like columns: NumPy arrays, lists...

`px` arguments can also be array-like objects such as lists, NumPy arrays, in both long-form or wide-form (for certain functions).
Expand Down
Loading