Skip to content

Sync Fork from Upstream Repo #26

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 90 commits into from
Aug 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
2a2ee8b
DOC: Add histogram category order example (#2779)
hweecat Oct 2, 2020
5334bf0
Merge remote-tracking branch 'upstream/master' into doc-histogram-cat…
hweecat Jan 2, 2021
6a6286a
fix for chromium renderer on linux systems (issue #2348)
c-chaitanya Jun 25, 2021
668b282
formating using the black formatter
c-chaitanya Jun 25, 2021
758e3ce
Fix typo: missing 'as'
jamespeapen Jul 12, 2021
08f6952
add some extra options to various demo datasets
nicolaskruchten Jul 16, 2021
ee03bcc
changelog
nicolaskruchten Jul 17, 2021
1b4f698
Merge pull request #3299 from jamespeapen/patch-2
nicolaskruchten Jul 17, 2021
612d3f9
Merge pull request #3305 from plotly/extended_data
nicolaskruchten Jul 17, 2021
9a7adc7
fix silly bug
nicolaskruchten Jul 18, 2021
ab622e3
fix pandas warnings
nicolaskruchten Jul 20, 2021
712684c
addressing comments on the pull request, modifying the exception stat…
c-chaitanya Jul 21, 2021
2c2dd6a
Merge pull request #3278 from c-chaitanya/chromium-browser-renderer-fix
nicolaskruchten Jul 21, 2021
a547e37
improve browser error messages
nicolaskruchten Jul 21, 2021
e7a3809
revert test change
nicolaskruchten Jul 21, 2021
72a949c
fix test
nicolaskruchten Jul 21, 2021
458554a
tweak tests
nicolaskruchten Jul 21, 2021
1e24ca0
better tests
nicolaskruchten Jul 21, 2021
6ed555b
Merge pull request #3310 from plotly/chromium_followup
nicolaskruchten Jul 21, 2021
e0fdb39
Remove duplicate import
fortierq Jul 24, 2021
ce1bf36
Merge pull request #3316 from fortierq/patch-1
nicolaskruchten Jul 25, 2021
f680f80
ability to show markers on lines
nicolaskruchten Aug 3, 2021
f2dbe5a
black
nicolaskruchten Aug 3, 2021
80509d5
improve scatter and line docs
nicolaskruchten Aug 3, 2021
1cafc5f
add all datasets to PX export for docs
nicolaskruchten Aug 3, 2021
3befb2c
more line docs
nicolaskruchten Aug 3, 2021
c67f800
Merge pull request #3326 from plotly/px_line_marker
nicolaskruchten Aug 3, 2021
44d437d
ma and ewm trendlines
nicolaskruchten Oct 26, 2020
1019985
extract trendline function API
nicolaskruchten Dec 25, 2020
560fad7
ols log options checkpoint
nicolaskruchten Dec 25, 2020
50572d5
move trendline code to own module
nicolaskruchten Dec 29, 2020
d1001c6
get trendline_functions into apidoc
nicolaskruchten Dec 30, 2020
2d3e8b0
tests for new trendlines
nicolaskruchten Dec 30, 2020
81a76c7
apidoc and tests
nicolaskruchten Dec 30, 2020
16a9c63
fix up tests
nicolaskruchten Dec 31, 2020
c413a31
docstrings
nicolaskruchten Jan 1, 2021
aad79b4
docstrings
nicolaskruchten Jan 1, 2021
ce73f31
docstrings
nicolaskruchten Jan 2, 2021
1fa9fac
add PX utility functions to apidoc
nicolaskruchten Jan 4, 2021
d0ab458
refactor new trendlines
nicolaskruchten Aug 2, 2021
619c693
clarify
nicolaskruchten Aug 3, 2021
744afb9
docstring
nicolaskruchten Aug 3, 2021
e7a2fbc
bugfix
nicolaskruchten Aug 3, 2021
b6806ff
trendline_scope
nicolaskruchten Aug 5, 2021
6ef46bf
black
nicolaskruchten Aug 5, 2021
f37eb06
changelog
nicolaskruchten Aug 5, 2021
03c146c
changelog
nicolaskruchten Aug 5, 2021
bd0d368
validate trendline_options
nicolaskruchten Aug 5, 2021
860a321
tweak docstrings
nicolaskruchten Aug 5, 2021
d7e7dbf
Unpin six in requirements.txt
maresb Aug 10, 2021
aca0020
Set minimal version for six
maresb Aug 10, 2021
6fc1002
try embedding SciPy talk video
nicolaskruchten Aug 10, 2021
dedecd3
try embedding SciPy talk video
nicolaskruchten Aug 10, 2021
20adc4e
Merge pull request #3341 from maresb/patch-1
nicolaskruchten Aug 10, 2021
b820672
Bump tar from 6.1.0 to 6.1.7 in /packages/javascript/jupyterlab-plotly
dependabot[bot] Aug 10, 2021
9192a68
Bump path-parse in /packages/javascript/jupyterlab-plotly
dependabot[bot] Aug 10, 2021
ab0e0ab
positive values only for logs
nicolaskruchten Aug 11, 2021
f42c5af
docs for trendlines
nicolaskruchten Aug 12, 2021
78ddc06
bump Plotly.js to 2.3.1
nicolaskruchten Aug 13, 2021
9f8633a
Merge pull request #3342 from plotly/dependabot/npm_and_yarn/packages…
nicolaskruchten Aug 13, 2021
ed48215
Merge pull request #2997 from plotly/trendlines2
nicolaskruchten Aug 13, 2021
700e83f
wip
nicolaskruchten Jan 8, 2021
538f18e
mostly finished ECDF
nicolaskruchten Jan 10, 2021
807b828
wip
nicolaskruchten Jan 11, 2021
5f0ac8b
finishing up ECDF
nicolaskruchten Aug 6, 2021
dfe6216
primitive KDE implementation, matches though
nicolaskruchten Aug 6, 2021
9df2302
wip
nicolaskruchten Aug 6, 2021
9fd2f6b
kde labelling
nicolaskruchten Aug 6, 2021
d4a733c
work out line shape for ecdfmode
nicolaskruchten Aug 11, 2021
b3c6c5d
wip
nicolaskruchten Aug 12, 2021
542ed5a
docs sweep
nicolaskruchten Aug 13, 2021
33381b1
back out KDE
nicolaskruchten Aug 13, 2021
787b16d
changelog
nicolaskruchten Aug 13, 2021
dcbd39f
EPS file change due to gl pixel ratio
nicolaskruchten Aug 13, 2021
2d43ac7
Merge pull request #3330 from plotly/distfuncs2
nicolaskruchten Aug 13, 2021
9f4c5d0
Merge pull request #3346 from plotly/js2.3.1
nicolaskruchten Aug 13, 2021
8cebd31
Merge pull request #3343 from plotly/dependabot/npm_and_yarn/packages…
nicolaskruchten Aug 13, 2021
09017f3
Update troubleshooting.md
nicolaskruchten Aug 13, 2021
796e9f1
Merge branch 'doc-prod'
nicolaskruchten Aug 13, 2021
91e75a1
Merge pull request #2802 from hweecat/doc-histogram-categoryorder
nicolaskruchten Aug 13, 2021
744930c
changelog
nicolaskruchten Aug 13, 2021
1c4b1f5
Merge branch 'doc-prod'
nicolaskruchten Aug 13, 2021
f724e3b
doc tweak
nicolaskruchten Aug 13, 2021
76826f0
add pretty_names option to datasets
nicolaskruchten Aug 13, 2021
e42bd37
Merge pull request #3347 from plotly/pretty_names
nicolaskruchten Aug 13, 2021
18252a2
release 5.2.0
nicolaskruchten Aug 13, 2021
d943d62
fix up build process
nicolaskruchten Aug 13, 2021
c116672
release 5.2.1
nicolaskruchten Aug 13, 2021
87e6457
doc bumps to 5.2.1
nicolaskruchten Aug 14, 2021
c8bd6ee
doc bumps to 5.2.1
nicolaskruchten Aug 14, 2021
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
  •  
  •  
  •  
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,27 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## UNRELEASED
## [5.2.1] - 2021-08-13

### Updated

- Updated Plotly.js to from version 2.2.0 to version 2.3.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#231----2021-07-30) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
- new projections in `geo` subplots from a more recent version of `d3-geo`
- new number-formatting directives from a more recent version of `d3-format`
- Improve rendering of `scattergl`, `splom` and `parcoords` by implementing `plotGlPixelRatio` for those traces
- performance improvements and bug fixes

### Added
- Extra flags were added to the `gapminder` and `stocks` dataset to facilitate testing, documentation and demos [#3305](https://github.com/plotly/plotly.py/issues/3305)
- All line-like Plotly Express functions now accept `markers` argument to display markers, and all but `line_mapbox` accept `symbol` to map a field to the symbol attribute, similar to scatter-like functions [#3326](https://github.com/plotly/plotly.py/issues/3326)
- `px.scatter` and `px.density_contours` now support new `trendline` types `'rolling'`, `'expanding'` and `'ewm'` [#2997](https://github.com/plotly/plotly.py/pull/2997)
- `px.scatter` and `px.density_contours` now support new `trendline_options` argument to parameterize trendlines, with support for constant control and log-scaling in `'ols'` and specification of the fraction used for `'lowess'`, as well as pass-through to Pandas for `'rolling'`, `'expanding'` and `'ewm'` [#2997](https://github.com/plotly/plotly.py/pull/2997)
- `px.scatter` and `px.density_contours` now support new `trendline_scope` argument that accepts the value `'overall'` to request a single trendline for all traces, including across facets and animation frames [#2997](https://github.com/plotly/plotly.py/pull/2997)
- A new `px.ecdf()` function for Empirical Cumulative Distribution Functions [#3330](https://github.com/plotly/plotly.py/pull/3330)

### Fixed
- Fixed regression introduced in version 5.0.0 where pandas/numpy arrays with `dtype` of Object were being converted to `list` values when added to a Figure ([#3292](https://github.com/plotly/plotly.py/issues/3292), [#3293](https://github.com/plotly/plotly.py/pull/3293))
- Better detection of Chrome and Chromium browsers in the Renderers framework, especially on Linux ([#3278](https://github.com/plotly/plotly.py/pull/3278)) with thanks to [@c-chaitanya](https://github.com/c-chaitanya) for the contribution

## [5.1.0] - 2021-06-28

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Our recommended IDE for Plotly’s Python graphing library is Dash Enterprise’

## Quickstart

`pip install plotly==5.1.0`
`pip install plotly==5.2.1`

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

Expand Down Expand Up @@ -86,13 +86,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.1.0
pip install plotly==5.2.1
```

or conda.

```
conda install -c plotly plotly=5.1.0
conda install -c plotly plotly=5.2.1
```

### JupyterLab Support
Expand All @@ -114,7 +114,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.1.0 @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyterlab-plotly@5.2.1 @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.1.0
plotly==5.2.1
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.1.0"
release = "5.2.1"


# -- General configuration ---------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions doc/apidoc/plotly.express.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ plotly's high-level API for rapid figure generation. ::
density_heatmap
density_mapbox
imshow
set_mapbox_access_token
get_trendline_results


`plotly.express` subpackages
Expand All @@ -60,3 +62,4 @@ plotly's high-level API for rapid figure generation. ::

generated/plotly.express.data.rst
generated/plotly.express.colors.rst
generated/plotly.express.trendline_functions.rst
2 changes: 0 additions & 2 deletions doc/python/3d-line-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ jupyter:

```python
import plotly.express as px
import plotly.express as px
df = px.data.gapminder().query("country=='Brazil'")
fig = px.line_3d(df, x="gdpPercap", y="pop", z="year")
fig.show()
```

```python
import plotly.express as px
import plotly.express as px
df = px.data.gapminder().query("continent=='Europe'")
fig = px.line_3d(df, x="gdpPercap", y="pop", z="year", color='country')
fig.show()
Expand Down
2 changes: 1 addition & 1 deletion doc/python/axes.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Other kinds of subplots and axes are described in other tutorials:
The different types of Cartesian axes are configured via the `xaxis.type` or `yaxis.type` attribute, which can take on the following values:

- `'linear'` as described in this page
- `'log'` (see the [log plot tutorial](/python/log-plots/))
- `'log'` (see the [log plot tutorial](/python/log-plot/))
- `'date'` (see the [tutorial on timeseries](/python/time-series/))
- `'category'` (see the [categorical axes tutorial](/python/categorical-axes/))
- `'multicategory'` (see the [categorical axes tutorial](/python/categorical-axes/))
Expand Down
11 changes: 8 additions & 3 deletions doc/python/box-plots.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.2'
jupytext_version: 1.6.0
jupytext_version: 1.4.2
kernelspec:
display_name: Python 3
language: python
Expand All @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.7.6
version: 3.7.7
plotly:
description: How to make Box Plots in Python with Plotly.
display_as: statistical
Expand All @@ -36,13 +36,18 @@ jupyter:
thumbnail: thumbnail/box.jpg
---

A [box plot](https://en.wikipedia.org/wiki/Box_plot) is a statistical representation of numerical data through their quartiles. The ends of the box represent the lower and upper quartiles, while the median (second quartile) is marked by a line inside the box. For other statistical representations of numerical data, see [other statistical charts](https://plotly.com/python/statistical-charts/).
<!-- #region -->
A [box plot](https://en.wikipedia.org/wiki/Box_plot) is a statistical representation of the distribution of a variable through its quartiles. The ends of the box represent the lower and upper quartiles, while the median (second quartile) is marked by a line inside the box. For other statistical representations of numerical data, see [other statistical charts](https://plotly.com/python/statistical-charts/).


Alternatives to box plots for visualizing distributions include [histograms](https://plotly.com/python/histograms/), [violin plots](https://plotly.com/python/violin/), [ECDF plots](https://plotly.com/python/ecdf-plots/) and [strip charts](https://plotly.com/python/strip-charts/).

## Box Plot with `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.
<!-- #endregion -->

```python
import plotly.express as px
Expand Down
10 changes: 5 additions & 5 deletions doc/python/bubble-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.2
kernelspec:
display_name: Python 3
language: python
Expand All @@ -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 bubble charts in Python with Plotly.
display_as: basic
Expand All @@ -36,7 +36,7 @@ jupyter:

## Bubble chart with plotly.express

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/).
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 [scatter plot documentation](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 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.

Expand Down Expand Up @@ -222,4 +222,4 @@ fig.show()

### Reference

See https://plotly.com/python/reference/scatter/ for more information and chart attribute options!
See https://plotly.com/python/reference/scatter/ for more information and chart attribute options!
35 changes: 34 additions & 1 deletion doc/python/categorical-axes.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This page shows examples of how to configure [2-dimensional Cartesian axes](/pyt
The different types of Cartesian axes are configured via the `xaxis.type` or `yaxis.type` attribute, which can take on the following values:

- `'linear'` (see the [linear axes tutorial](/python/axes/))
- `'log'` (see the [log plot tutorial](/python/log-plots/))
- `'log'` (see the [log plot tutorial](/python/log-plot/))
- `'date'` (see the [tutorial on timeseries](/python/time-series/))
- `'category'` see below
- `'multicategory'` see below
Expand All @@ -64,6 +64,39 @@ fig.update_xaxes(type='category')
fig.show()
```

### Categorical Axes and Trace Types

Every cartesian trace type is compatible with categorical axes, not just `bar`.

Scatter plots where one axis is categorical are often known as [dot plots](https://plotly.com/python/dot-plots/).

```python
import plotly.express as px
df = px.data.medals_long()

fig = px.scatter(df, y="nation", x="count", color="medal", symbol="medal")
fig.update_traces(marker_size=10)
fig.show()
```

[Box plots]() and [violin plots]() are often shown with one categorical and one continuous axis.

```python
import plotly.express as px
df = px.data.tips()

fig = px.box(df, x="sex", y="total_bill", color="smoker")
fig.show()
```

```python
import plotly.express as px
df = px.data.tips()

fig = px.violin(df, x="sex", y="total_bill", color="smoker")
fig.show()
```

### Controlling the Category Order with 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/).
Expand Down
17 changes: 13 additions & 4 deletions doc/python/dot-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.2
kernelspec:
display_name: Python 3
language: python
Expand All @@ -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 dot plots in Python with Plotly.
display_as: basic
Expand All @@ -35,12 +35,21 @@ jupyter:

#### Basic Dot Plot

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.
Dot plots (also known as [Cleveland dot plots](<https://en.wikipedia.org/wiki/Dot_plot_(statistics)>)) are [scatter plots](https://plotly.com/python/line-and-scatter/) with one categorical axis and one continuous axis. They can be used to 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` or `go.Scatter`.

[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
df = px.data.medals_long()

fig = px.scatter(df, y="nation", x="count", color="medal", symbol="medal")
fig.update_traces(marker_size=10)
fig.show()
```

```python
import plotly.express as px
import pandas as pd
Expand Down
Loading