Skip to content

Merge master back in to doc-prod to deploy updated docs #4239

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 161 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
8b58c7f
PX can accept non-pandas dataframes that can .to_pandas()
nicolaskruchten Sep 25, 2022
eff3a3e
:recycle: avoid deepcopy of dict in validate_coerce
jvdd Nov 3, 2022
24c82c5
:dash: avoid deepcopy in validate_coerce when BaseTraceType
jonasvdd Nov 3, 2022
052e2c1
added: ignore facet args with empty dataset
AaronStiff Jan 25, 2023
7a14376
moved changes into infer_config
AaronStiff Jan 28, 2023
e5fe18a
fixed: constrain colors between 0 and 255
AaronStiff Mar 16, 2023
9cf598c
fixed: wrong logic, this should work
AaronStiff Mar 16, 2023
8d9eb45
Update CHANGELOG.md
LiamConnors Mar 30, 2023
50c6820
Update release.md
LiamConnors Apr 5, 2023
956ab2c
Merge pull request #4152 from plotly/update-release-steps
LiamConnors Apr 6, 2023
dc6e7bb
Adding some rounding and error messaging
stephenpardy Apr 6, 2023
458ce89
Merge branch 'doc-prod' into LiamConnors-patch-1
LiamConnors Apr 13, 2023
57ec19f
Be more forgiving when anything with opening a webbrowser fails
bartbroere Apr 15, 2023
d296c16
Apply black
bartbroere Apr 16, 2023
781a24c
update plotly.js version
LiamConnors Apr 18, 2023
77d0211
update plotly.js version
LiamConnors Apr 18, 2023
cc94803
fixed bug for issue #3755 when the figure object contains subplots
zfoltz Apr 21, 2023
ebb3808
fixed bug for issue #3755 when the figure object does not contain sub…
zfoltz Apr 21, 2023
d0522f5
incorrect use of 'is' changed to '=='
zfoltz Apr 21, 2023
24ad4c7
added some conditionals to help find bug in subplot shapes
zfoltz Apr 22, 2023
1933885
Add tests for this scenario
bartbroere Apr 25, 2023
b7a275d
Run black
bartbroere Apr 25, 2023
8bb24b9
fixed bug which was causing shapes to be all drawn on the same axis
zfoltz Apr 26, 2023
1d1db35
removed some no longer needed files that were being used to find the …
zfoltz Apr 26, 2023
d95d8ee
added tests
zfoltz Apr 26, 2023
f92dc6e
added comments and cleaned up code
zfoltz Apr 26, 2023
9f06509
more comments
zfoltz Apr 27, 2023
746b227
removed import plotly express from test
zfoltz Apr 27, 2023
f04ebfc
Update shapes.md
LiamConnors Apr 27, 2023
24d544a
Update shapes.md
LiamConnors Apr 27, 2023
313d8d4
update plotly.js
LiamConnors Apr 27, 2023
66e7a67
update plotly.js version
LiamConnors Apr 27, 2023
d434b65
codegen files for plotly.js update
LiamConnors Apr 27, 2023
74c0e1a
Update legend.md
LiamConnors Apr 27, 2023
65e4764
Merge branch 'update-plotlyjs-docs' of https://github.com/plotly/plot…
LiamConnors Apr 27, 2023
7422fdf
Update shapes.md
LiamConnors Apr 27, 2023
11a6942
Update shapes.md
LiamConnors Apr 27, 2023
2198872
Merge branch 'master' into handle_spacing_with_spec
stephenpardy May 2, 2023
9570606
update to cimg images, and full_build with node 16
alexcjohnson May 3, 2023
0bf21f9
tweak ci config?
alexcjohnson May 4, 2023
4d71da6
black mplexporter???
alexcjohnson May 4, 2023
fadcec5
new eps images, new pdftops version 22.02.0
alexcjohnson May 4, 2023
5c21370
try to restrict percy to a single width, and longer timeout
alexcjohnson May 4, 2023
c2f1a66
longer percy timeout
alexcjohnson May 4, 2023
9aa0b8f
percy - try static.options.execute.beforeSnapshot
alexcjohnson May 4, 2023
fbb3272
red square to test if we're running percy execute.beforeSnapshot
alexcjohnson May 4, 2023
a07e9a5
remove the red square, it did its job
alexcjohnson May 4, 2023
eb91c0f
noeval write_image calls in static-image-export doc
alexcjohnson May 4, 2023
e70bf8f
a different noeval for static-image-export
alexcjohnson May 4, 2023
3eb3ee4
Merge pull request #4188 from plotly/update-ci-images
alexcjohnson May 4, 2023
aedd67a
add a test that should fail since px doesn't support pandas 2
alexcjohnson May 4, 2023
efd4047
move px pandas2 test to percy test, and update it to Py3.9
alexcjohnson May 4, 2023
a8af752
pandas append -> concat
alexcjohnson May 5, 2023
06d0360
changelog entry for pandas2 px line_close fix
alexcjohnson May 5, 2023
9c04542
pandas 1/2 px comparison: looser equality of just the figure spec
alexcjohnson May 5, 2023
810dca9
black compare-pandas
alexcjohnson May 5, 2023
284e9bc
remove pandas2 images so percy doesn't try to run them
alexcjohnson May 5, 2023
5b65329
Merge pull request #4190 from plotly/px-pandas2
alexcjohnson May 5, 2023
981bef4
Merge branch 'master' into update-plotlyjs-docs
LiamConnors May 5, 2023
336a880
Merge branch 'master' into axis_spanning_layout_object_xref_yref_bug
alexcjohnson May 5, 2023
9f8c92d
comment tweaks and remove commented-out code
alexcjohnson May 5, 2023
d80f975
Update packages/python/plotly/plotly/_subplots.py
alexcjohnson May 5, 2023
e4478e5
Merge branch 'master' into handle_spacing_with_spec
alexcjohnson May 5, 2023
2bc5258
Add test for rounding
stephenpardy May 5, 2023
6936fd3
Add to changelog
stephenpardy May 5, 2023
f6af929
Update packages/python/plotly/plotly/tests/test_io/test_renderers.py
bartbroere May 5, 2023
d5bce9a
Update test and also round other values
stephenpardy May 5, 2023
495bc35
Merge branch 'master' into 3984-facets-empty-dataset
AaronStiff May 5, 2023
bf7f6de
code formatting
stephenpardy May 5, 2023
59ffd90
Merge pull request #4153 from stephenpardy/handle_spacing_with_spec
alexcjohnson May 5, 2023
97dd016
Merge branch 'master' into LiamConnors-patch-1
LiamConnors May 5, 2023
49c4c02
Merge pull request #4165 from plotly/update-plotlyjs-docs
LiamConnors May 8, 2023
0ed9972
Merge branch 'master' into LiamConnors-patch-1
LiamConnors May 8, 2023
1e4bb3f
Merge pull request #4138 from plotly/LiamConnors-patch-1
alexcjohnson May 8, 2023
9543afe
escape unsafe chars in JSON
alexcjohnson May 6, 2023
115d166
test for json sanitization
alexcjohnson May 8, 2023
fabd54d
adjust old test for orjson datetime64 fixed precision
alexcjohnson May 9, 2023
b955f35
changelog for JSON sanitizer
alexcjohnson May 9, 2023
e6dd4b4
added test
AaronStiff May 9, 2023
644215c
Merge branch 'plotly:master' into 3984-facets-empty-dataset
AaronStiff May 9, 2023
36823a9
added changelog entry
AaronStiff May 9, 2023
04029f6
black formatting
AaronStiff May 10, 2023
8b2d4bf
Fixed issued caused by a paper or domain, yref
zfoltz May 10, 2023
260e3a3
Merge branch 'axis_spanning_layout_object_xref_yref_bug' of https://g…
zfoltz May 10, 2023
ea8c795
Merge branch 'plotly:master' into axis_spanning_layout_object_xref_yr…
zfoltz May 10, 2023
a9bfd76
Merge branch 'axis_spanning_layout_object_xref_yref_bug' of https://g…
zfoltz May 10, 2023
872e3d5
Added changelog entry
zfoltz May 10, 2023
fc3ef00
Merge pull request #4196 from plotly/safe-json
alexcjohnson May 10, 2023
7678812
fixed issue with annotation_text of an axis_spanning_shape being disp…
zfoltz May 12, 2023
cc7e200
Merge branch 'axis_spanning_layout_object_xref_yref_bug' of https://g…
zfoltz May 12, 2023
c2860de
Added check to catch if no yref was supplied
zfoltz May 12, 2023
42abf1e
Failed to install pkg
J815 May 12, 2023
a0288c5
Merge branch 'master' into axis_spanning_layout_object_xref_yref_bug
zfoltz May 12, 2023
392f9fc
update to plotly.js 2.23.0
LiamConnors May 15, 2023
f2447a4
Update CHANGELOG.md
LiamConnors May 15, 2023
942d9c1
Update legend.md
LiamConnors May 15, 2023
7d91cb7
Update colorscales.md
LiamConnors May 17, 2023
c90fd1d
Update Plotly.js version to 2.23.1
LiamConnors May 17, 2023
ff43b73
Update legend.md
LiamConnors May 17, 2023
ff0a454
Update CHANGELOG.md
LiamConnors May 17, 2023
6cb115c
Update doc/python/colorscales.md
LiamConnors May 17, 2023
bb5c2e2
Merge pull request #4206 from J815/J815-patch-1
alexcjohnson May 19, 2023
411d66a
changelog for use_2to3, and fix setup.cfg as also mentioned in issue …
alexcjohnson May 19, 2023
3b4b324
explicitly set figure height, for jupyterlab v4
alexcjohnson May 19, 2023
a8fa9dd
Apply suggestions from code review
alexcjohnson May 24, 2023
8df887d
pin jupyterlab=3 in full_build CI job
alexcjohnson Jun 2, 2023
973b139
changelog for jlab4 fix
alexcjohnson Jun 2, 2023
58075f4
Merge pull request #4227 from plotly/jlab4-take2
alexcjohnson Jun 3, 2023
f5d2900
Merge branch 'master' into axis_spanning_layout_object_xref_yref_bug
alexcjohnson Jun 3, 2023
42266b0
Merge pull request #4177 from zfoltz/axis_spanning_layout_object_xref…
alexcjohnson Jun 3, 2023
72bc7c8
Merge branch 'master' into patch-1
alexcjohnson Jun 3, 2023
e496849
Merge branch 'master' into update-plotly-js
LiamConnors Jun 3, 2023
e2ec195
Mock absent webbrowser module
bartbroere Jun 3, 2023
d0ee161
np.int is a deprecated copy of the built-in int
bartbroere Jun 3, 2023
2248f1d
Revert "Mock absent webbrowser module"
bartbroere Jun 3, 2023
855f622
This should crash the test
bartbroere Jun 3, 2023
7965119
Apply suggestion
bartbroere Jun 3, 2023
74968c1
Temporarily make webbrowser module absent the right way
bartbroere Jun 3, 2023
cdc7ffd
Run black
bartbroere Jun 3, 2023
a255c63
Merge pull request #4161 from bartbroere/patch-1
alexcjohnson Jun 4, 2023
e6e70fd
Merge pull request #4228 from bartbroere/fix-np-aliased-int
alexcjohnson Jun 4, 2023
649d275
Merge branch 'master' into 3984-facets-empty-dataset
alexcjohnson Jun 4, 2023
3b613fc
Merge pull request #4038 from AaronStiff/3984-facets-empty-dataset
alexcjohnson Jun 4, 2023
03d98af
Merge branch 'master' of https://github.com/plotly/plotly.py into 410…
AaronStiff Jun 4, 2023
83b76b6
added test
AaronStiff Jun 4, 2023
5f13927
update changelog
AaronStiff Jun 4, 2023
216fca2
Merge pull request #4110 from AaronStiff/4105_n_colors_clipping
alexcjohnson Jun 4, 2023
f578cbc
Update Plotly.js version to 2.24.0
LiamConnors Jun 6, 2023
507b25f
Update pie-charts.md
LiamConnors Jun 6, 2023
f2473db
Update pattern-hatching-texture.md
LiamConnors Jun 6, 2023
04f682d
Update pattern-hatching-texture.md
LiamConnors Jun 6, 2023
96a9430
Merge branch 'master' into update-plotly-js
LiamConnors Jun 6, 2023
30a55a3
Update CHANGELOG.md
LiamConnors Jun 6, 2023
c26af7b
Update funnel-charts.md
LiamConnors Jun 6, 2023
c24c060
Update pattern-hatching-texture.md
LiamConnors Jun 6, 2023
253fa4e
Update sunburst-charts.md
LiamConnors Jun 6, 2023
7570bbf
Update treemaps.md
LiamConnors Jun 7, 2023
a97b2b4
Update icicle-charts.md
LiamConnors Jun 7, 2023
96ae271
formatting
LiamConnors Jun 7, 2023
d92676c
Update icicle-charts.md
LiamConnors Jun 7, 2023
3c5d8e8
Merge branch 'master' into avoid_deepcopy
jvdd Jun 7, 2023
374d59f
:pen: check for histogram2dcontour
jvdd Jun 7, 2023
68d7180
:broom: formatting
jvdd Jun 7, 2023
740b7a5
Update _streamline.py to avoid np.matrix
ArthurTlprt Jun 7, 2023
e84b58e
Merge pull request #1 from ArthurTlprt/ArthurTlprt-patch-1
ArthurTlprt Jun 7, 2023
a2a2bf3
Update CHANGELOG.md
LiamConnors Jun 7, 2023
16e663a
update plotly.js to 2.24.1
LiamConnors Jun 7, 2023
a28a1c4
Update config.yml
LiamConnors Jun 7, 2023
3dc764e
Update packages/python/plotly/_plotly_utils/basevalidators.py
alexcjohnson Jun 7, 2023
605ac4f
Update packages/python/plotly/_plotly_utils/basevalidators.py
alexcjohnson Jun 7, 2023
d1668b6
Merge pull request #3946 from jvdd/avoid_deepcopy
alexcjohnson Jun 7, 2023
4367763
Update CHANGELOG.md
LiamConnors Jun 7, 2023
2d055a4
Merge pull request #4210 from plotly/update-plotly-js
LiamConnors Jun 7, 2023
6aae637
remove now-obsolete lines in streamline ff
alexcjohnson Jun 8, 2023
c3b0fda
Merge pull request #4233 from ArthurTlprt/master
alexcjohnson Jun 8, 2023
0e0eaa8
Merge branch 'master' into px_to_pandas
alexcjohnson Jun 8, 2023
69b4d3e
Merge pull request #3901 from plotly/px_to_pandas
alexcjohnson Jun 8, 2023
e42897d
version changes for v5.15.0
LiamConnors Jun 8, 2023
a5bf3d1
Merge pull request #4237 from plotly/release-5.15.0
LiamConnors Jun 8, 2023
9169f40
update plotly version in docs
LiamConnors Jun 8, 2023
981ace8
Merge pull request #4238 from plotly/update-docs-5-15-0
LiamConnors Jun 8, 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
  •  
  •  
  •  
217 changes: 158 additions & 59 deletions .circleci/config.yml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ doc/check-or-enforce-order.py
packages/javascript/jupyterlab-plotly/lib/
packages/python/plotly/jupyterlab_plotly/labextension/
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*

test/percy/*.html
test/percy/pandas2/*.html
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [5.15.0] - 2023-06-08

### Updated
- Updated Plotly.js from version 2.20.0 to version 2.24.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2241----2023-06-07) for more information. Notable changes include:
- Add pattern to pie, funnelarea, sunburst, icicle and treemap traces [[#6601](https://github.com/plotly/plotly.js/pull/6601), [#6619](https://github.com/plotly/plotly.js/pull/6619), [#6622](https://github.com/plotly/plotly.js/pull/6622), [#6626](https://github.com/plotly/plotly.js/pull/6626), [#6627](https://github.com/plotly/plotly.js/pull/6627), [#6628](https://github.com/plotly/plotly.js/pull/6628), [#6629](https://github.com/plotly/plotly.js/pull/6629)], with thanks to @thierryVergult for the contribution!
- Add `texttemplate` to shape.label for parametric shapes i.e. line, rect and circle [[#6527](https://github.com/plotly/plotly.js/pull/6527)],
with thanks to the [Volkswagen](https://www.volkswagenag.com) Center of Excellence for Battery Systems for sponsoring development!
- Add strict option to custom bundle command [[#6557](https://github.com/plotly/plotly.js/pull/6557)],
with thanks to @CallumNZ for the contribution!
- Add `legend` references to traces and `legend2`, `legend3`, etc. to layout,
also add `visible` to legend i.e. to allow positioning multiple legends on a graph [[#6535](https://github.com/plotly/plotly.js/pull/6535)],
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

### Fixed
- Fixed another compatibility issue with Pandas 2.0, just affecting `px.*(line_close=True)` [[#4190](https://github.com/plotly/plotly.py/pull/4190)]
- Empty pandas dataframe with facet row/column set no longer fails [[#4038](https://github.com/plotly/plotly.py/pull/4038)]
- Added some rounding to the `make_subplots` function to handle situations where the user-input specs cause the domain to exceed 1 by small amounts [[#4153](https://github.com/plotly/plotly.py/pull/4153)]
- Sanitize JSON output to prevent an XSS vector when graphs are inserted directly into HTML [[#4196](https://github.com/plotly/plotly.py/pull/4196)]
- Fixed issue with shapes and annotations plotting on the wrong y axis when supplied with a specific axis in the `yref` parameter [[#4177](https://github.com/plotly/plotly.py/pull/4177)]
- Remove `use_2to3` setuptools arg, which is invalid in the latest Python and setuptools versions [[#4206](https://github.com/plotly/plotly.py/pull/4206)]
- Fix [#4066](https://github.com/plotly/plotly.py/issues/4066) JupyterLab v4 giving tiny default graph height [[#4227](https://github.com/plotly/plotly.py/pull/4227)]
- Fixed issue with `colors.n_colors` where generated RGB color values were not being constrained to stay between 0 and 255 [[#4110](https://github.com/plotly/plotly.py/pull/4110)]
- Fix streamline figure factory with recent versions of Numpy
- Fix issue with shapes and annotations not drawing on correct axis [[#4177](https://github.com/plotly/plotly.py/pull/4177)]

## [5.14.1] - 2023-04-05

### Fixed
Expand All @@ -10,7 +38,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [5.14.0] - 2023-03-29

### Updated
- Updated Plotly.js to from version 2.18.2 to version 2.20.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2200----2023-03-15) for more information. Notable changes include:
- Updated Plotly.js from version 2.18.2 to version 2.20.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2200----2023-03-15) for more information. Notable changes include:
- Add `title.automargin` to enable automatic top and bottom margining for both container and paper referenced titles [[#6428](https://github.com/plotly/plotly.js/pull/6428)],
with thanks to [Gamma Technologies](https://www.gtisoft.com/) for sponsoring the related development.
- Add `label` attribute to shapes [[#6454](https://github.com/plotly/plotly.js/pull/6454)], with thanks to the [Volkswagen](https://www.volkswagenag.com) Center of Excellence for Battery Systems for sponsoring development!
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.14.1`
`pip install plotly==5.15.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.14.1
pip install plotly==5.15.0
```

or conda.

```
conda install -c plotly plotly=5.14.1
conda install -c plotly plotly=5.15.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.14.1 @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyterlab-plotly@5.15.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.14.1
plotly==5.15.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.14.1"
release = "5.15.0"


# -- General configuration ---------------------------------------------------
Expand Down
32 changes: 31 additions & 1 deletion doc/python/colorscales.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.10.9
version: 3.10.11
plotly:
description: How to set, create and control continuous color scales and color
bars in scatter, bar, map and heatmap figures.
Expand Down Expand Up @@ -632,6 +632,36 @@ fig = go.Figure(go.Heatmap(
fig.show()
```

### Positioning Colorbars

Colorbars can be positioned by specifying x and y coordinates. By default, the x and y values are "paper" coordinates, which refer to the plot area. You can also use coordinates based on the "container" by setting `xref="container"` or `yref="container"`. The following example uses a container reference for the x position.

See the positioning section of [the figure data structure page](/python/figure-structure/#positioning-with-paper-container-coordinates-or-axis-domain-coordinates) for more details on "paper" vs "container" coordinates.

```python
import plotly.graph_objects as go

import urllib
import json

# Load heatmap data
response = urllib.request.urlopen(
"https://raw.githubusercontent.com/plotly/datasets/master/custom_heatmap_colorscale.json")
dataset = json.load(response)

# Create and show figure
fig = go.Figure(go.Heatmap(
z=dataset["z"],
colorbar=dict(
x=0.2,
xref="container",
title="Surface Heat"
)
))

fig.show()
```

### Reference

See https://plotly.com/python/reference/ for more information and chart attribute options!
28 changes: 25 additions & 3 deletions doc/python/funnel-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jupyter:
text_representation:
extension: .md
format_name: markdown
format_version: '1.2'
jupytext_version: 1.3.0
format_version: '1.3'
jupytext_version: 1.14.6
kernelspec:
display_name: Python 3
display_name: Python 3 (ipykernel)
language: python
name: python3
plotly:
Expand Down Expand Up @@ -200,6 +200,28 @@ fig.update_layout(
fig.show()
```

### Pattern Fills

*New in 5.15*

Funnel area charts support [patterns](/python/pattern-hatching-texture/) (also known as hatching or texture) in addition to color. In this example, we add a pattern to the second stage of the funnel.

```python
from plotly import graph_objects as go

colors = ["gold", "gold", "lightgreen", "lavender"]

fig = go.Figure(
go.Funnelarea(
labels=["Interview 1", "Interview 2", "Test", "Final Stage"],
values=[100, 70, 40, 20],
textfont_size=20,
marker=dict(colors=colors, pattern=dict(shape=["", "/", "", ""])),
)
)
fig.show()
```

#### Reference

See [function reference for `px.(funnel)`](https://plotly.com/python-api-reference/generated/plotly.express.funnel) or https://plotly.com/python/reference/funnel/ and https://plotly.com/python/reference/funnelarea/ for more information and chart attribute options!
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.14.1
$ pip install plotly==5.15.0
```

or `conda`:

```
$ conda install -c plotly plotly=5.14.1
$ conda install -c plotly plotly=5.15.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.14.1 @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyterlab-plotly@5.15.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
32 changes: 28 additions & 4 deletions doc/python/icicle-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jupyter:
text_representation:
extension: .md
format_name: markdown
format_version: '1.2'
jupytext_version: 1.4.2
format_version: '1.3'
jupytext_version: 1.14.6
kernelspec:
display_name: Python 3
display_name: Python 3 (ipykernel)
language: python
name: python3
language_info:
Expand All @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.7.7
version: 3.10.11
plotly:
description: How to make Icicle Charts.
display_as: basic
Expand Down Expand Up @@ -418,6 +418,30 @@ fig.update_layout(margin = dict(t=50, l=25, r=25, b=25))
fig.show()
```

### Pattern Fills

*New in 5.15*

Icicle charts support [patterns](/python/pattern-hatching-texture/) (also known as hatching or texture) in addition to color. In this example, we apply a pattern to all chart sections. We also configure the `size` and `solidity` of the pattern.

```python
import plotly.graph_objects as go

fig = go.Figure(
go.Icicle(
labels=["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
parents=["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve"],
values=[10, 14, 12, 10, 2, 6, 6, 4, 4],
root_color="lightgrey",
textfont_size=20,
marker=dict(pattern=dict(shape="|", size=5, solidity=0.9)),
)
)

fig.update_layout(margin=dict(t=50, l=25, r=25, b=25))
fig.show()
```

### Set the Direction of Icicle charts

As mentioned above, Icicle charts can grow in one of four directions. Icicle charts have a `tiling` attribute and this has two attributes: `orientation` and `flip`. `orientation` takes either `h` (horiztonal) or `v` (vertical) and `flip` takes either `x` or `y`. You can use these two attributes in combination to create each of the four cardinal directions: left, right, top, bottom.
Expand Down
105 changes: 103 additions & 2 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.1
jupytext_version: 1.14.5
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.8.0
version: 3.10.11
plotly:
description: How to configure and style the legend in Plotly with Python.
display_as: file_settings
Expand Down Expand Up @@ -574,6 +574,107 @@ fig.update_layout(width=600, title_text='Exploration of a vector field using sev
fig.show()
```

### Adding Multiple Legends

*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.

In this example, the last two scatter traces display on the second legend, "legend2". On the figure's layout, we then position and style this legend to display on the right of the graph below the first legend.


```python
import plotly.graph_objects as go
from plotly import data

df = data.gapminder()

df_germany = df.loc[(df.country.isin(["Germany"]))]
df_france = df.loc[(df.country.isin(["France"]))]
df_uk = df.loc[(df.country.isin(["United Kingdom"]))]


df_averages_europe = (
df.loc[(df.continent.isin(["Europe"]))].groupby(by="year").mean(numeric_only=True)
)
df_averages_americas = (
df.loc[(df.continent.isin(["Americas"]))].groupby(by="year").mean(numeric_only=True)
)


fig = go.Figure(
data=[
go.Scatter(x=df_germany.year, y=df_germany.gdpPercap, name="Germany"),
go.Scatter(x=df_france.year, y=df_france.gdpPercap, name="France"),
go.Scatter(x=df_uk.year, y=df_uk.gdpPercap, name="UK"),
go.Scatter(
x=df_averages_europe.index,
y=df_averages_europe.gdpPercap,
name="Europe",
legend="legend2",
),
go.Scatter(
x=df_averages_americas.index,
y=df_averages_americas.gdpPercap,
name="Americas",
legend="legend2",
),
],
layout=dict(
title="GDP Per Capita",
legend={"title": "By country", "bgcolor": "Orange",},
legend2={
"x": 1.155,
"y": 0.55,
"xanchor": "right",
"yanchor": "middle",
"bgcolor": "Gold",
"title": {"text": "By continent"},
},
),
)

fig.show()

```

### Positioning Legends

In the previous example, we position the second legend by specifying x and y values. By default, these values are based on the width and height of the plot area. It is also possible to specify values that reference the container width and height by setting "xref=container" and "yref="container" (the default values are "xref=paper" and "yref="paper"). When set to "container", the margin grows so the legend and plot don't overlap.

```python
import plotly.graph_objects as go
from plotly import data

df = data.gapminder()

df_germany = df.loc[(df.country.isin(["Germany"]))]
df_france = df.loc[(df.country.isin(["France"]))]
df_uk = df.loc[(df.country.isin(["United Kingdom"]))]

fig = go.Figure(
data=[
go.Scatter(x=df_germany.year, y=df_germany.gdpPercap, name="Germany"),
go.Scatter(x=df_france.year, y=df_france.gdpPercap, name="France"),
go.Scatter(x=df_uk.year, y=df_uk.gdpPercap, name="UK"),
],
layout=dict(
title="GDP Per Capita",
legend={
"x": 0.9,
"y": 0.9,
"xref": "container",
"yref": "container",
"bgcolor": "Gold",
"title": {"text": "By continent"},
},
),
)

fig.show()

```

#### Reference

See https://plotly.com/python/reference/layout/#layout-legend for more information!
Loading