Skip to content
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

PX Input upgrades - wide form, constant, identity, auto-orientation etc #2336

Merged
merged 74 commits into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
ec10b7b
initial cut at wide-form support
nicolaskruchten Mar 31, 2020
2168ec8
wip
nicolaskruchten Apr 2, 2020
79be641
wip
nicolaskruchten Apr 2, 2020
b99c2fa
initial pass at PX auto-orientation
nicolaskruchten Mar 31, 2020
df0b4d1
cleanup
nicolaskruchten Mar 31, 2020
4a2ddd1
fix for odd box/violin spacing when axis matches color
nicolaskruchten Mar 31, 2020
a2ca3c5
clean up default {}
nicolaskruchten Apr 1, 2020
442f3a1
smarter histfunc defaults
nicolaskruchten Apr 1, 2020
453e9e0
px.IdentityMap
nicolaskruchten Mar 29, 2020
c08f0bf
px.Constant
nicolaskruchten Mar 29, 2020
77139b9
PR feedback
nicolaskruchten Mar 30, 2020
ba36fa9
black
nicolaskruchten Mar 30, 2020
dd043d6
satisfy flake8
nicolaskruchten Apr 3, 2020
f952e64
test auto orient box-like
nicolaskruchten Apr 3, 2020
f58c3b5
locking down auto_orientation with tests
nicolaskruchten Apr 3, 2020
12e6aaa
respect column index name and pass through melted names
nicolaskruchten Apr 6, 2020
767c3bd
fix too-narrow type check bug
nicolaskruchten Apr 6, 2020
c06c555
tests wip
nicolaskruchten Apr 7, 2020
e28fbf7
DRY up attrable lists
nicolaskruchten Apr 7, 2020
fa2fe51
testing wip
nicolaskruchten Apr 8, 2020
b174d7f
sort columns for python < 3.6
nicolaskruchten Apr 8, 2020
48e56ef
wide mode special case tests
nicolaskruchten Apr 8, 2020
d57d035
extra comments and another test
nicolaskruchten Apr 8, 2020
e4071a9
px.Range
nicolaskruchten Apr 9, 2020
ea14fc9
smarter x or y behaviour
nicolaskruchten Apr 10, 2020
a376c6d
smarter x or y behaviour
nicolaskruchten Apr 10, 2020
6f3b5c4
scattergl doesn't support orientation
nicolaskruchten Apr 11, 2020
e5b9679
move gl switch
nicolaskruchten Apr 14, 2020
6b28eda
fix Pandas warning, use parameterized tests
nicolaskruchten Apr 15, 2020
b96f8c1
fix Pandas warning, use parameterized tests
nicolaskruchten Apr 15, 2020
7e129b2
align bar and histogram behaviours in wide mode with categorical values
nicolaskruchten Apr 16, 2020
9d45dc8
wip
nicolaskruchten Apr 16, 2020
f2a0079
wip
nicolaskruchten Apr 16, 2020
977dbcf
wip wide_y
nicolaskruchten Apr 17, 2020
553bd0b
wip
nicolaskruchten Apr 17, 2020
9524d94
more tests, more parameterization
nicolaskruchten Apr 19, 2020
7b022f1
funnel is wideable
nicolaskruchten Apr 20, 2020
e8027f0
all cartesians now support wide mode
nicolaskruchten Apr 20, 2020
d8b337e
merging master
nicolaskruchten Apr 28, 2020
a85acf6
get rid of
nicolaskruchten Apr 30, 2020
dff2c11
raise errors on multi-index in column/index in wide mode
nicolaskruchten Apr 30, 2020
f3039ac
parameterize test_px
nicolaskruchten Apr 30, 2020
f733831
manage ugly name collisions
nicolaskruchten Apr 30, 2020
e78cb50
lock down edge cases around name collisions
nicolaskruchten May 1, 2020
02109c8
Merge branch 'master' into wide_form2
nicolaskruchten May 14, 2020
b1bcd08
PR comments
nicolaskruchten May 14, 2020
3a87007
wide-mode docstrings
nicolaskruchten May 15, 2020
3129e63
fix ordering in tests in py < 3.6
nicolaskruchten May 15, 2020
bd551c0
fix tests py2.7
nicolaskruchten May 15, 2020
18276cf
expand docstrings a bit
nicolaskruchten May 15, 2020
b788721
wide datasets
nicolaskruchten May 15, 2020
be36f37
better timeseries dataset
nicolaskruchten May 16, 2020
1882f51
pandas backend
nicolaskruchten May 16, 2020
0b442b1
cleaner pandas backend
nicolaskruchten May 17, 2020
773b669
special case for wide-var=columns
nicolaskruchten May 17, 2020
7745f23
straight equality test
nicolaskruchten May 17, 2020
5dfcd4e
make CI pass for now
nicolaskruchten May 17, 2020
f2e64f4
changelog and more docstring
nicolaskruchten May 18, 2020
58999bf
changelog
nicolaskruchten May 18, 2020
08800a5
Merge branch 'master' into wide_form2
nicolaskruchten May 21, 2020
883f02e
long and wide
nicolaskruchten May 21, 2020
122b3ca
Merge branch 'master' into wide_form2
nicolaskruchten May 21, 2020
b1b2d7c
wide form docs draft
nicolaskruchten May 21, 2020
65822bc
Emma's changelog
nicolaskruchten May 21, 2020
de764ce
Merge branch 'master' into wide_form2
nicolaskruchten May 22, 2020
2eaea98
accept indexes as wide-mode spec
nicolaskruchten May 24, 2020
3adcfd2
reject wide-mode with different types
nicolaskruchten May 24, 2020
f8f0880
make list-like hover_data more robust
nicolaskruchten May 24, 2020
3479c68
Update doc/python/wide-form.md
nicolaskruchten May 24, 2020
4599415
Update doc/python/radar-chart.md
nicolaskruchten May 24, 2020
5430490
PR feedback
nicolaskruchten May 24, 2020
0bc7ba5
PR feedback
nicolaskruchten May 24, 2020
51dbf60
docs
nicolaskruchten May 25, 2020
b19d2c6
bump doc pandas
nicolaskruchten May 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.8.0] - not yet released

### Added

- `plotly` now provides a Plotly Express-backed Pandas-compatible plotting backend, which can be activated via `pandas.options.plotting.backend = "plotly"`. Note that it is not intended to implement every Pandas plotting function, nor is it intended to replicate the behaviour of every argument, although per the changes below, `x` and `y` should behave similarly. ([#2336](https://github.com/plotly/plotly.py/pull/2336))
- New datasets have been added to `plotly.express.data`: `stocks`, `experiment`, `short_track_wide` and `short_track_long`. ([#2336](https://github.com/plotly/plotly.py/pull/2336))
- plotly `go.Figure` and `go.FigureWidget` now have a `_repr_html_` and a `_repr_mimebundle_` method, which are [standard hooks for integration in systems based on IPython](https://ipython.readthedocs.io/en/stable/config/integrating.html). In particular, with `_repr_html_` plotly figures can now be used within [sphinx-gallery](https://sphinx-gallery.github.io/stable/index.html) without any scraper. These additions should not change anything to the way plotly figures are displayed in notebook environments, since the `_ipython_display_` method (already present in earlier versions) takes precedence over the new methods.

### Updated

- The behaviour of the `x`, `y`, `orientation`, `histfunc`, `violinmode`, `boxmode` and `stripmode` arguments for 2d-cartesian functions in Plotly Express (i.e. `scatter`, `line`, `area`, `bar`, `histogram`, `violin`, `box`, `strip`, `funnel`, `density_heatmap` and `density_contour`) has been refined ([#2336](https://github.com/plotly/plotly.py/pull/2336)):
- if `x` or `y` is missing, it is inferred to be the index of `data_frame` if `data_frame` provided, otherwise a stable index of integers starting at 0. In the case of `px.bar`, if the provided value is not continuous, the missing value is treated as a column of 1s named "count", so as to behave more like `px.histogram` and to avoid sizing the resulting bars differently based on their position in the column. Previously, missing values defaulted to integers starting at 0 *per trace* which made it potentially inconsistent or misleading.
- if `x` (`y`) is missing, `orientation` now defaults to `v` (`h`). Previously it always defaulted to `v` but this is not considered a breaking change, as the cases in which it now defaults to `h` caused unreadable output if set to `v`.
- if both `x` and `y` are provided and one of them does not contain continuous values, `orientation` defaults to the value perpendicular to that axis. Previously it always defaulted to `v` but this is not considered a breaking change, as the cases in which it now defaults to `h` caused unreadable output if set to `v`.
- if either `x` or `y` (but not both) may now be provided as a list of column references into `data_frame` or columns of data, in which case the imputed data frame will be treated as "wide" data and `melt()`ed internally before applying the usual mapping rules, with function-specific defaults.
- if neither `x` nor `y` is provided but `data_frame` is, the data frame will be treated as "wide" with defaults depending on the value of `orientation` (and `orientation` has accordingly been added to `scatter`, `line`, `density_heatmap`, and `density_contour` for this purpose). Previously this would have resulted in an empty figure.
- if both `x` and `y` are provided to `histogram`, and if `x`, `y` and `z` are provided to `density_heatmap` or `density_contour`, then `histfunc` now defaults to `sum` so as to avoid ignoring the provided data, and to cause `histogram` and `bar` to behave more similarly.
- `violinmode`, `boxmode` and `stripmode` now default to `overlay` if `x` (`y`) in in `v` (`h`) orientation is also mapped to `color`, to avoid strange spacing issues with the previous default of `group` in all cases.
- The Plotly Express arguments `color_discrete_map`, `symbol_map` and `line_dash_map` now accept the string `"identity"` which causes the corresponding input data to be used as-is rather than mapped into `color_discrete_sequence`, `symbol_sequence` or `line_dash_sequence`, respectively. ([#2336](https://github.com/plotly/plotly.py/pull/2336))
- Plotly Express now accepts `px.Constant` or `px.Range` objects in the place of column references so as to express constant or increasing integer values. ([#2336](https://github.com/plotly/plotly.py/pull/2336))


## [4.7.1] - 2020-05-08

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion doc/python/2D-Histogram.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ A 2D histogram, also known as a density heatmap, is the 2-dimensional generaliza

## Density Heatmaps with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/). The Plotly Express function `density_heatmap()` can be used to produce density heatmaps.
[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/). The Plotly Express function `density_heatmap()` can be used to produce density heatmaps.

```python
import plotly.express as px
Expand Down
2 changes: 1 addition & 1 deletion doc/python/2d-histogram-contour.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ A 2D histogram contour plot, also known as a density contour plot, is a 2-dimens

## Density Contours with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/). The Plotly Express function `density_contour()` can be used to produce density contours.
[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/). The Plotly Express function `density_contour()` can be used to produce density contours.

```python
import plotly.express as px
Expand Down
2 changes: 1 addition & 1 deletion doc/python/3d-scatter-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jupyter:

## 3D scatter plot with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

Like the [2D scatter plot](https://plotly.com/python/line-and-scatter/) `px.scatter`, the 3D function `px.scatter_3d` plots individual data in three-dimensional space.

Expand Down
2 changes: 1 addition & 1 deletion doc/python/bar-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jupyter:

### Bar chart with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

With `px.bar`, each row of the DataFrame is represented as a rectangular mark.

Expand Down
2 changes: 1 addition & 1 deletion doc/python/box-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ A [box plot](https://en.wikipedia.org/wiki/Box_plot) is a statistical representa

## Box Plot with `plotly.express`

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

In a box plot created by `px.box`, the distribution of the column given as `y` argument is represented.

Expand Down
2 changes: 1 addition & 1 deletion doc/python/bubble-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jupyter:

A [bubble chart](https://en.wikipedia.org/wiki/Bubble_chart) is a scatter plot in which a third dimension of the data is shown through the size of markers. For other types of scatter plot, see the [line and scatter page](https://plotly.com/python/line-and-scatter/).

We first show a bubble chart example using Plotly Express. [Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/). The size of markers is set from the dataframe column given as the `size` parameter.
We first show a bubble chart example using Plotly Express. [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/). The size of markers is set from the dataframe column given as the `size` parameter.

```python
import plotly.express as px
Expand Down
2 changes: 1 addition & 1 deletion doc/python/bubble-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Plotly figures made with `px.scatter_geo`, `px.line_geo` or `px.choropleth` func

### Bubble map with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/). With `px.scatter_geo`, each line of the dataframe is represented as a marker point. The column set as the `size` argument gives the size of markers.
[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/). With `px.scatter_geo`, each line of the dataframe is represented as a marker point. The column set as the `size` argument gives the size of markers.

```python
import plotly.express as px
Expand Down
3 changes: 1 addition & 2 deletions doc/python/choropleth-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The GeoJSON data is passed to the `geojson` argument, and the data is passed int

### Choropleth Map with plotly.express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

#### GeoJSON with `feature.id`

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

# Load data frame and tidy it.
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/2011_us_ag_exports.csv')

Expand Down
2 changes: 1 addition & 1 deletion doc/python/distplot.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jupyter:

Several representations of statistical distributions are available in plotly, such as [histograms](https://plotly.com/python/histograms/), [violin plots](https://plotly.com/python/violin/), [box plots](https://plotly.com/python/box-plots/) (see [the complete list here](https://plotly.com/python/statistical-charts/)). It is also possible to combine several representations in the same plot.

For example, the `plotly.express` function `px.histogram` can add a subplot with a different statistical representation than the histogram, given by the parameter `marginal`. [Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
For example, the `plotly.express` function `px.histogram` can add a subplot with a different statistical representation than the histogram, given by the parameter `marginal`. [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/).

```python
import plotly.express as px
Expand Down
4 changes: 2 additions & 2 deletions doc/python/dot-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jupyter:

Dot plots (also known as [Cleveland dot plots](<https://en.wikipedia.org/wiki/Dot_plot_(statistics)>)) show changes between two (or more) points in time or between two (or more) conditions. Compared to a [bar chart](/python/bar-charts/), dot plots can be less cluttered and allow for an easier comparison between conditions.

For the same data, we show below how to create a dot plot using either `px.scatter` (for a tidy pandas DataFrame) or `go.Scatter`.
For the same data, we show below how to create a dot plot using either `px.scatter` or `go.Scatter`.

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

```python
import plotly.express as px
Expand Down
2 changes: 1 addition & 1 deletion doc/python/error-bars.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jupyter:

### Error Bars with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/). For functions representing 2D data points such as [`px.scatter`](https://plotly.com/python/line-and-scatter/), [`px.line`](https://plotly.com/python/line-charts/), [`px.bar`](https://plotly.com/python/bar-charts/) etc., error bars are given as a column name which is the value of the `error_x` (for the error on x position) and `error_y` (for the error on y position).
[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/). For functions representing 2D data points such as [`px.scatter`](https://plotly.com/python/line-and-scatter/), [`px.line`](https://plotly.com/python/line-charts/), [`px.bar`](https://plotly.com/python/bar-charts/) etc., error bars are given as a column name which is the value of the `error_x` (for the error on x position) and `error_y` (for the error on y position).

```python
import plotly.express as px
Expand Down
2 changes: 1 addition & 1 deletion doc/python/filled-area-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This example shows how to fill the area enclosed by traces.

## Filled area plot with plotly.express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

`px.area` creates a stacked area plot. Each filled area corresponds to one value of the column given by the `line_group` parameter.

Expand Down
2 changes: 1 addition & 1 deletion doc/python/funnel-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Funnel charts are often used to represent data in different stages of a business

### Basic Funnel Plot with plotly.express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

With `px.funnel`, each row of the DataFrame is represented as a stage of the funnel.

Expand Down
2 changes: 1 addition & 1 deletion doc/python/heatmaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jupyter:

### Heatmap with `plotly.express` and `px.imshow`

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/). With `px.imshow`, each value of the input array is represented as a heatmap pixel.
[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/). With `px.imshow`, each value of the input array is represented as a heatmap pixel.

For more examples using `px.imshow`, see the [tutorial on displaying image data with plotly](/python/imshow).

Expand Down
2 changes: 1 addition & 1 deletion doc/python/histograms.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bar, go to the [Bar Chart tutorial](/python/bar-charts/).

## Histogram with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

```python
import plotly.express as px
Expand Down
4 changes: 2 additions & 2 deletions doc/python/horizontal-bar-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ See more examples of bar charts (including vertical bar charts) and styling opti

### Horizontal Bar Chart with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/). For a horizontal bar char, use the `px.bar` function with `orientation='h'`.
[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/). For a horizontal bar char, use the `px.bar` function with `orientation='h'`.

#### Basic Horizontal Bar Chart with Plotly Express

Expand All @@ -64,7 +64,7 @@ fig.show()

### Horizontal Bar Chart with go.Bar

When data are not available as a tidy dataframe, you can use the more generic function `go.Bar` from `plotly.graph_objects`. All the options of `go.Bar` are documented in the reference https://plotly.com/python/reference/#bar
You can also use the more generic function `go.Bar` from `plotly.graph_objects`. All the options of `go.Bar` are documented in the reference https://plotly.com/python/reference/#bar

#### Basic Horizontal Bar Chart

Expand Down
2 changes: 1 addition & 1 deletion doc/python/line-and-scatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jupyter:

## Scatter plot with Plotly Express

[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
[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/).

With `px.scatter`, each data point is represented as a marker point, whose location is given by the `x` and `y` columns.

Expand Down
Loading