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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
All notable changes to this project will be documented in this file.
3
3
This project adheres to [Semantic Versioning](http://semver.org/).
4
4
5
+
6
+
## UNRELEASED
7
+
8
+
### Updated
9
+
- 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.
10
+
-`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.
Copy file name to clipboardExpand all lines: doc/python/plotly-express.md
+6-7
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@ jupyter:
5
5
text_representation:
6
6
extension: .md
7
7
format_name: markdown
8
-
format_version: '1.2'
9
-
jupytext_version: 1.4.2
8
+
format_version: '1.3'
9
+
jupytext_version: 1.14.7
10
10
kernelspec:
11
-
display_name: Python 3
11
+
display_name: Python 3 (ipykernel)
12
12
language: python
13
13
name: python3
14
14
language_info:
@@ -20,7 +20,7 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.7.7
23
+
version: 3.10.4
24
24
plotly:
25
25
description: Plotly Express is a terse, consistent, high-level API for creating
26
26
figures.
@@ -42,8 +42,7 @@ Plotly Express provides [more than 30 functions for creating different types of
42
42
43
43
Here is a talk from the [SciPy 2021 conference](https://www.scipy2021.scipy.org/) that gives a good introduction to Plotly Express and [Dash](https://dash.plotly.com/):
44
44
45
-
```python hide_code=true
46
-
%%html
45
+
```html hide_code=true
47
46
<divalign="center">
48
47
<iframewidth="560"height="315"
49
48
src="https://www.youtube.com/embed/FpCgG85g2Hw"
@@ -72,7 +71,7 @@ The Plotly Express API in general offers the following features:
72
71
73
72
***A single entry point into `plotly`**: just `import plotly.express as px` and get access to [all the plotting functions](https://plotly.com/python-api-reference/plotly.express.html), plus [built-in demo datasets under `px.data`](https://plotly.com/python-api-reference/generated/plotly.data.html#module-plotly.data) and [built-in color scales and sequences under `px.color`](https://plotly.com/python-api-reference/generated/plotly.colors.html#module-plotly.colors). Every PX function returns a `plotly.graph_objects.Figure` object, so you can edit it using all the same methods like [`update_layout` and `add_trace`](https://plotly.com/python/creating-and-updating-figures/#updating-figures).
74
73
***Sensible, Overridable Defaults**: PX functions will infer sensible defaults wherever possible, and will always let you override them.
75
-
***Flexible Input Formats**: PX functions [accept input in a variety of formats](/python/px-arguments/), from `list`s and `dict`s to [long-form or wide-form Pandas `DataFrame`s](/python/wide-form/) to [`numpy` arrays and `xarrays`](/python/imshow/) to [GeoPandas `GeoDataFrames`](/python/maps/).
74
+
***Flexible Input Formats**: PX functions [accept input in a variety of formats](/python/px-arguments/), from `list`s and `dict`s to [long-form or wide-form `DataFrame`s](/python/wide-form/) to [`numpy` arrays and `xarrays`](/python/imshow/) to [GeoPandas `GeoDataFrames`](/python/maps/).
76
75
***Automatic Trace and Layout configuration**: PX functions will create one [trace](/python/figure-structure) per animation frame for each unique combination of data values mapped to discrete color, symbol, line-dash, facet-row and/or facet-column. Traces' [`legendgroup` and `showlegend` attributes](https://plotly.com/python/legend/) are set such that only one legend item appears per unique combination of discrete color, symbol and/or line-dash. Traces are automatically linked to a correctly-configured [subplot of the appropriate type](/python/figure-structure).
77
76
***Automatic Figure Labelling**: PX functions [label axes, legends and colorbars](https://plotly.com/python/figure-labels/) based in the input `DataFrame` or `xarray`, and provide [extra control with the `labels` argument](/python/styling-plotly-express/).
78
77
***Automatic Hover Labels**: PX functions populate the hover-label using the labels mentioned above, and provide [extra control with the `hover_name` and `hover_data` arguments](/python/hover-text-and-formatting/).
Copy file name to clipboardExpand all lines: doc/python/px-arguments.md
+39-7
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@ jupyter:
5
5
text_representation:
6
6
extension: .md
7
7
format_name: markdown
8
-
format_version: '1.2'
9
-
jupytext_version: 1.4.2
8
+
format_version: '1.3'
9
+
jupytext_version: 1.14.7
10
10
kernelspec:
11
-
display_name: Python 3
11
+
display_name: Python 3 (ipykernel)
12
12
language: python
13
13
name: python3
14
14
language_info:
@@ -20,7 +20,7 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.7.7
23
+
version: 3.10.4
24
24
plotly:
25
25
description: Input data arguments accepted by Plotly Express functions
26
26
display_as: file_settings
@@ -35,9 +35,11 @@ jupyter:
35
35
36
36
### Plotly Express works with Column-oriented, Matrix or Geographic Data
37
37
38
-
[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on a variety of types of data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
38
+
[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which operates on a variety of types of data and produces [easy-to-style figures](/python/styling-plotly-express/).
39
39
40
-
Plotly Express provides functions to visualize a variety of types of data. Most functions such as `px.bar` or `px.scatter` expect to operate on column-oriented data of the type you might store in a Pandas `DataFrame` (in either "long" or "wide" format, see below). [`px.imshow` operates on matrix-like data](/python/imshow/) you might store in a `numpy` or `xarray` array and functions like [`px.choropleth` and `px.choropleth_mapbox` can operate on geographic data](/python/maps/) of the kind you might store in a GeoPandas `GeoDataFrame`. This page details how to provide column-oriented data to most Plotly Express functions.
40
+
Plotly Express provides functions to visualize a variety of types of data. Most functions such as `px.bar` or `px.scatter` expect to operate on column-oriented data of the type you might store in a `DataFrame` (in either "long" or "wide" format, see below). These functions use Pandas internally to process the data, but also accept other types of DataFrames as arguments. See the **Input Data as Non-Pandas DataFrames** section below for more details.
41
+
42
+
[`px.imshow` operates on matrix-like data](/python/imshow/) you might store in a `numpy` or `xarray` array and functions like [`px.choropleth` and `px.choropleth_mapbox` can operate on geographic data](/python/maps/) of the kind you might store in a GeoPandas `GeoDataFrame`. This page details how to provide column-oriented data to most Plotly Express functions.
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 or supports the [Python dataframe interchange protocol](https://data-apis.org/dataframe-protocol/latest/index.html), for example, a [Polars](https://www.pola.rs/) DataFrame.
176
+
177
+
Plotly Express uses Pandas internally to process the data. When you provide a Non-Pandas DataFrame to the `data_frame` argument of a Plotly Express function, the entire DataFrame is converted to a Pandas DataFrame.
178
+
179
+
If you are using a type of DataFrame that doesn't have a `to_pandas` method, but supports the Python dataframe interchange protocol, you'll need to have Pandas version 2.0.3 or later installed.
180
+
181
+
In this example, we use a Polars DataFrame. If you are using Polars, you'll need to install `pyarrow`, which is used by its [`to_pandas` method](
Copy file name to clipboardExpand all lines: doc/python/wide-form.md
+8-6
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@ jupyter:
5
5
text_representation:
6
6
extension: .md
7
7
format_name: markdown
8
-
format_version: '1.2'
9
-
jupytext_version: 1.4.2
8
+
format_version: '1.3'
9
+
jupytext_version: 1.14.7
10
10
kernelspec:
11
-
display_name: Python 3
11
+
display_name: Python 3 (ipykernel)
12
12
language: python
13
13
name: python3
14
14
language_info:
@@ -20,7 +20,7 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.7.7
23
+
version: 3.10.4
24
24
plotly:
25
25
description: Plotly Express' 2D-Cartesian functions accept data in long-, wide-,
26
26
and mixed-form.
@@ -36,7 +36,9 @@ jupyter:
36
36
37
37
### Plotly Express works with Column-oriented, Matrix or Geographic Data
38
38
39
-
Plotly Express provides functions to visualize a variety of types of data. Most functions such as `px.bar` or `px.scatter` expect to operate on column-oriented data of the type you might store in a Pandas `DataFrame` (in either "long" or "wide" format, see below). [`px.imshow` operates on matrix-like data](/python/imshow/) you might store in a `numpy` or `xarray` array and functions like [`px.choropleth` and `px.choropleth_mapbox` can operate on geographic data](/python/maps/) of the kind you might store in a GeoPandas `GeoDataFrame`. This page details how to provide a specific form of column-oriented data to 2D-Cartesian Plotly Express functions, but you can also check out our [detailed column-input-format documentation](/python/px-arguments/).
39
+
Plotly Express provides functions to visualize a variety of types of data. Most functions such as `px.bar` or `px.scatter` expect to operate on column-oriented data of the type you might store in a `DataFrame` (in either "long" or "wide" format, see below). These functions use Pandas internally to process the data, but also accept other types of DataFrames as arguments. See the [Plotly Express arguments page](/python/px-arguments/) for more details.
40
+
41
+
[`px.imshow` operates on matrix-like data](/python/imshow/) you might store in a `numpy` or `xarray` array and functions like [`px.choropleth` and `px.choropleth_mapbox` can operate on geographic data](/python/maps/) of the kind you might store in a GeoPandas `GeoDataFrame`. This page details how to provide a specific form of column-oriented data to 2D-Cartesian Plotly Express functions, but you can also check out our [detailed column-input-format documentation](/python/px-arguments/).
40
42
41
43
### Plotly Express works with Long-, Wide-, and Mixed-Form Data
Copy file name to clipboardExpand all lines: release.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,8 @@ start by doing it first if not. Then merge `master` into `doc-prod` to deploy th
128
128
to features in the release.
129
129
3. in a clone of the [`graphing-library-docs` repo](https://github.com/plotly/graphing-library-docs):
130
130
1. bump the version of Plotly.py in `_data/pyversion.json`
131
-
2. bump the version of Plotly.js with `cd _data && python get_plotschema.py <PLOTLY.JS VERSION>` fixing any errors that come up
131
+
2. bump the version of Plotly.js with `cd _data && python get_plotschema.py <PLOTLY.JS VERSION>` fixing any errors that come up.
132
+
- If Plotly.js contains any new traces or trace or layout attributes, you'll get a warning `“missing key in attributes: <attribute-name>`. To resolve, add the attribute to the relevant section in `/_data/orderings.json` in the position you want it to appear in the reference docs.
132
133
3. rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`
133
134
4. Rebuild the Algolia `python` index with `ALGOLIA_API_KEY=<key> make update_python_search`
134
135
5. Commit and push the changes to `master` in that repo
0 commit comments