Skip to content

Commit 282ed0d

Browse files
committed
Merge remote-tracking branch 'origin/master' into colorscale-sampling
2 parents e774d3f + fa292ed commit 282ed0d

File tree

183 files changed

+18206
-256698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+18206
-256698
lines changed

Diff for: .circleci/config.yml

+154-277
Large diffs are not rendered by default.

Diff for: .circleci/create_conda_optional_env.sh

-23
This file was deleted.

Diff for: .circleci/install_miniconda_and_build_.sh

-15
This file was deleted.

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ doc/python/.mapbox_token
4848
doc/.ipynb_checkpoints
4949
tags
5050
doc/check-or-enforce-order.py
51+
52+
packages/javascript/jupyterlab-plotly/lib/
53+
packages/python/plotly/jupyterlab_plotly/labextension/
54+
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*

Diff for: CHANGELOG.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
135135
faster image rendering and smaller figure size. Additional optional arguments
136136
`binary_backend`, `binary_format` and `binary_compression_level` control
137137
how to generate the b64 string ([#2691](https://github.com/plotly/plotly.py/pull/2691)
138-
- `px.imshow` has a new `constrast_rescaling` argument in order to choose how
138+
- `px.imshow` has a new `contrast_rescaling` argument in order to choose how
139139
to set data values corresponding to the bounds of the color range
140140
([#2691](https://github.com/plotly/plotly.py/pull/2691)
141141

@@ -239,7 +239,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
239239

240240
### Added
241241

242-
- The `hover_data` parameter of `px` functions can now be a dictionary. This makes it possible to skip hover information for some arguments or to change the formatting of hover informatiom [#2377](https://github.com/plotly/plotly.py/pull/2377).
242+
- The `hover_data` parameter of `px` functions can now be a dictionary. This makes it possible to skip hover information for some arguments or to change the formatting of hover information [#2377](https://github.com/plotly/plotly.py/pull/2377).
243243
- It's now possible to build a development version of Plotly.py against the build artifacts from a non-`master` branch of Plotly.js, which makes for faster QA and development cycles [#2349](https://github.com/plotly/plotly.py/pull/2349). Thanks [@zouhairm](https://github.com/zouhairm) for this Pull Request!
244244

245245
### Fixed
@@ -252,7 +252,7 @@ This version includes several performance improvements ([#2368](https://github.c
252252

253253
- Child graph objects (e.g. `figure.layout.xaxis`) are no longer created eagerly during graph object construction. Instead, they are created lazily the first time the property is accessed.
254254
- Property validation is now disabled for select internal operations.
255-
- When used with Python 3.7 and above, ploty.py now takes advantage of [PEP-562](https://www.python.org/dev/peps/pep-0562/) to perform submodule imports lazily. This dramatically improves import times.
255+
- When used with Python 3.7 and above, plotly.py now takes advantage of [PEP-562](https://www.python.org/dev/peps/pep-0562/) to perform submodule imports lazily. This dramatically improves import times.
256256

257257
## [4.6.0] - 2020-03-31
258258

@@ -290,7 +290,7 @@ This version includes several performance improvements ([#2368](https://github.c
290290

291291
- Jupyterlab extension now compatible with both Jupyterlab 1.2 and 2.0 [#2261](https://github.com/plotly/plotly.py/pull/2261) with thanks to [@consideRatio](https://github.com/consideRatio) for the contribution!
292292
- Fixed a bug when using boolean values for the color argument of px functions [#2127](https://github.com/plotly/plotly.py/pull/2127)
293-
- Corrected import bug which was occuring with old versions of ipywidgets [#2265](https://github.com/plotly/plotly.py/pull/2265)
293+
- Corrected import bug which was occurring with old versions of ipywidgets [#2265](https://github.com/plotly/plotly.py/pull/2265)
294294
- Fixed python 3.8 syntax warning [#2262](https://github.com/plotly/plotly.py/pull/2262), with thanks to [@sgn](https://github.com/sgn) for the contribution!
295295

296296
## [4.5.3] - 2020-03-05
@@ -365,7 +365,7 @@ This version includes several performance improvements ([#2368](https://github.c
365365
for more information
366366
- The tutorials of the [plotly.py documentation](https://plot.ly/python/) are
367367
now in the main [plotly.py Github repository](https://github.com/plotly/plotly.py). Contributions in order to improve or extend the documentation are very welcome!
368-
- `plotly.express` generated plots no longer have a default height of 600 pixels, instead they inherit the default height of regular figures [#1990](https://github.com/plotly/plotly.py/pull/1990). To restore the old behavior, set `px.defaults.height=600` once per session, or set the `height` keyword arguement to any `px.function()` to 600.
368+
- `plotly.express` generated plots no longer have a default height of 600 pixels, instead they inherit the default height of regular figures [#1990](https://github.com/plotly/plotly.py/pull/1990). To restore the old behavior, set `px.defaults.height=600` once per session, or set the `height` keyword argument to any `px.function()` to 600.
369369

370370
### Fixed
371371

@@ -439,7 +439,7 @@ section [#1969](https://github.com/plotly/plotly.py/pull/1969).
439439
- The width of a figure produced by the `create_gantt` figure factory now resizes responsively ([#1724](https://github.com/plotly/plotly.py/pull/1724))
440440

441441
### Fixed
442-
- The name of the steps property of `graph_objects.indicator.Guage` has been renamed from `stepss` to `steps`
442+
- The name of the steps property of `graph_objects.indicator.Gauge` has been renamed from `stepss` to `steps`
443443
- Avoid crash in iframe renderers when running outside iPython ([#1723](https://github.com/plotly/plotly.py/pull/1723))
444444

445445
## [4.1.0] - 2019-08-06
@@ -491,7 +491,7 @@ This is a major release that includes many new features, and a few breaking chan
491491
- Added support for all trace types in `make_subplots` ([#1528](https://github.com/plotly/plotly.py/pull/1528))
492492
- Added support for secondary y-axes in `make_subplots` ([#1564](https://github.com/plotly/plotly.py/pull/1564))
493493
- Support passing a scalar trace object (rather than a list or tuple of trace objects) as the `data` property to the `Figure` constructor ([#1614](https://github.com/plotly/plotly.py/pull/1614))
494-
- Added dictionary-stule `.pop` method to graph object classes ([#1614](https://github.com/plotly/plotly.py/pull/1614))
494+
- Added dictionary-style `.pop` method to graph object classes ([#1614](https://github.com/plotly/plotly.py/pull/1614))
495495
- New `jupyterlab-plotly` JupyterLab extension for rendering figures in JupyterLab. Replaces the `@jupyterlab/plotly-extension` extension, and includes JupyterLab 1.0 support.
496496
- Added new suite of built-in colorscales to the `plotly.colors` module, and support for specifying this wide range of colorscales by name. Also added support for specifying colorscales as a list of colors, in which case the color spacing is assumed to be uniform ([#1647](https://github.com/plotly/plotly.py/pull/1647)).
497497
- Added `sphinx-gallery` renderer for embedding plotly figures in [Sphinx-Gallery](https://sphinx-gallery.github.io/) ([#1577](https://github.com/plotly/plotly.py/pull/1577), [plotly/plotly-sphinx-gallery](https://github.com/plotly/plotly-sphinx-gallery)).
@@ -1096,7 +1096,7 @@ must be installed:
10961096
properties are ignored rather than causing an exception.
10971097
- A `to_ordered_dict` method has been added to the `Figure` and `FigureWidget`
10981098
classes. This method returns a representation of the figure as a nested
1099-
structure of `OrdererdDict` and `list` instances where the keys in each
1099+
structure of `OrderedDict` and `list` instances where the keys in each
11001100
`OrderedDict` are sorted alphabetically. This method replaces the
11011101
`get_ordered` method that was available in version 2, and makes it possible
11021102
to traverse the nested structure of a figure in a deterministic order.
@@ -1517,7 +1517,7 @@ gone.
15171517
## [1.12.10] - 2016-11-28
15181518
### Updated
15191519
- `FF.create_violin` and `FF.create_scatterplotmatrix` now by default do not print subplot grid information in output
1520-
- Removed alert that occured when downloading plot images offline. Please note: for higher resolution images and more export options, consider making requests to our image servers. See: `help(py.image)` for more details.
1520+
- Removed alert that occurred when downloading plot images offline. Please note: for higher resolution images and more export options, consider making requests to our image servers. See: `help(py.image)` for more details.
15211521

15221522
### Added
15231523
- Plot configuration options for offline plots. See the list of [configuration options](https://github.com/Rikorose/plotly.py/blob/master/plotly/offline/offline.py#L189) and [examples](https://plot.ly/javascript/configuration-options/) for more information.

Diff for: README.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Our recommended IDE for Plotly’s Python graphing library is Dash Enterprise’
3939

4040
`pip install plotly==4.14.3`
4141

42-
Inside [Jupyter notebook](https://jupyter.org/install) (installable with `pip install "notebook>=5.3" "ipywidgets>=7.5"`):
42+
Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`):
4343

4444
```python
4545
import plotly.graph_objects as go
@@ -95,37 +95,22 @@ or conda.
9595
conda install -c plotly plotly=4.14.3
9696
```
9797

98-
### Jupyter Notebook Support
99-
100-
For use in the Jupyter Notebook, install the `notebook` and `ipywidgets`
101-
packages using `pip`:
102-
103-
```
104-
pip install "notebook>=5.3" "ipywidgets>=7.5"
105-
```
106-
107-
or `conda`:
108-
109-
```
110-
conda install "notebook>=5.3" "ipywidgets>=7.5"
111-
```
112-
11398
### JupyterLab Support
11499

115100
For use in JupyterLab, install the `jupyterlab` and `ipywidgets`
116101
packages using `pip`:
117102

118103
```
119-
pip install jupyterlab "ipywidgets>=7.5"
104+
pip install jupyterlab>=3 "ipywidgets>=7.6"
120105
```
121106

122107
or `conda`:
123108

124109
```
125-
conda install jupyterlab "ipywidgets>=7.5"
110+
conda install jupyterlab>=3 "ipywidgets>=7.6"
126111
```
127112

128-
Then run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):
113+
For JupyterLab 2 or earlier, run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):
129114

130115
```
131116
# Basic JupyterLab renderer support
@@ -137,6 +122,21 @@ jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.
137122

138123
Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
139124

125+
### Jupyter Notebook Support
126+
127+
For use in the Jupyter Notebook, install the `notebook` and `ipywidgets`
128+
packages using `pip`:
129+
130+
```
131+
pip install "notebook>=5.3" "ipywidgets>=7.5"
132+
```
133+
134+
or `conda`:
135+
136+
```
137+
conda install "notebook>=5.3" "ipywidgets>=7.5"
138+
```
139+
140140
### Static Image Export
141141

142142
plotly.py supports [static image export](https://plotly.com/python/static-image-export/),

Diff for: bld.bat

-8
This file was deleted.

Diff for: build.sh

-9
This file was deleted.

Diff for: build_for_conda.md

-19
This file was deleted.

Diff for: doc/python/2D-Histogram.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ fig = go.Figure(go.Histogram2d(x=x, y=y, histnorm='probability',
137137
fig.show()
138138
```
139139
### Sharing bin settings between 2D Histograms
140-
This example shows how to use [bingroup](https://plotly.com/python/reference/histogram/#histogram-bingroup) attribute to have a compatible bin settings for both histograms. To define `start`, `end` and `size` value of x-axis and y-axis seperatly, set [ybins](https://plotly.com/python/reference/histogram2dcontour/#histogram2dcontour-ybins) and `xbins`.
140+
This example shows how to use [bingroup](https://plotly.com/python/reference/histogram/#histogram-bingroup) attribute to have a compatible bin settings for both histograms. To define `start`, `end` and `size` value of x-axis and y-axis separately, set [ybins](https://plotly.com/python/reference/histogram2dcontour/#histogram2dcontour-ybins) and `xbins`.
141141

142142
```python
143143
import plotly.graph_objects as go

Diff for: doc/python/3d-isosurface-plots.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fig = go.Figure(data=go.Isosurface(
130130
fig.show()
131131
```
132132

133-
#### Isosurface with Addtional Slices
133+
#### Isosurface with Additional Slices
134134

135135
Here we visualize slices parallel to the axes on top of isosurfaces. For a clearer visualization, the `fill` ratio of isosurfaces is decreased below 1 (completely filled).
136136

@@ -235,4 +235,4 @@ fig.show()
235235
```
236236

237237
#### Reference
238-
See https://plotly.com/python/reference/isosurface/ for more information and chart attribute options!
238+
See https://plotly.com/python/reference/isosurface/ for more information and chart attribute options!

Diff for: doc/python/3d-mesh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ IFrame(snippet_url + '3d-mesh', width='100%', height=630)
8383

8484
### Mesh Tetrahedron
8585

86-
In this example we use the `ì`, `j` and `k` parameters to specify manually the geometry of the triangles of the mesh.
86+
In this example we use the `i`, `j` and `k` parameters to specify manually the geometry of the triangles of the mesh.
8787

8888
```python
8989
import plotly.graph_objects as go

Diff for: doc/python/LaTeX.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
jupyter:
3+
jupytext:
4+
notebook_metadata_filter: all
5+
text_representation:
6+
extension: .md
7+
format_name: markdown
8+
format_version: '1.2'
9+
jupytext_version: 1.4.2
10+
kernelspec:
11+
display_name: Python 3
12+
language: python
13+
name: python3
14+
language_info:
15+
codemirror_mode:
16+
name: ipython
17+
version: 3
18+
file_extension: .py
19+
mimetype: text/x-python
20+
name: python
21+
nbconvert_exporter: python
22+
pygments_lexer: ipython3
23+
version: 3.7.7
24+
plotly:
25+
description: How to add LaTeX to python graphs.
26+
display_as: advanced_opt
27+
language: python
28+
layout: base
29+
name: LaTeX
30+
order: 5
31+
page_type: example_index
32+
permalink: python/LaTeX/
33+
thumbnail: thumbnail/latex.jpg
34+
---
35+
36+
#### LaTeX Typesetting
37+
38+
```python
39+
import plotly.express as px
40+
41+
fig = px.line(x=[1, 2, 3, 4], y=[1, 4, 9, 16], title=r'$\alpha_{1c} = 352 \pm 11 \text{ km s}^{-1}$')
42+
fig.update_layout(
43+
xaxis_title=r'$\sqrt{(n_\text{c}(t|{T_\text{early}}))}$',
44+
yaxis_title=r'$d, r \text{ (solar radius)}$'
45+
)
46+
fig.show()
47+
```
48+
49+
```python
50+
import plotly.graph_objs as go
51+
52+
fig = go.Figure()
53+
fig.add_trace(go.Scatter(
54+
x=[1, 2, 3, 4],
55+
y=[1, 4, 9, 16],
56+
name=r'$\alpha_{1c} = 352 \pm 11 \text{ km s}^{-1}$'
57+
))
58+
fig.add_trace(go.Scatter(
59+
x=[1, 2, 3, 4],
60+
y=[0.5, 2, 4.5, 8],
61+
name=r'$\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$'
62+
))
63+
fig.update_layout(
64+
xaxis_title=r'$\sqrt{(n_\text{c}(t|{T_\text{early}}))}$',
65+
yaxis_title=r'$d, r \text{ (solar radius)}$'
66+
)
67+
fig.show()
68+
```

Diff for: doc/python/annotated-heatmap.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fig.show()
8282
```
8383

8484
#### Custom Text and X & Y Labels
85-
set `annotation_text` to a matrix with the same dimmensions as `z`
85+
set `annotation_text` to a matrix with the same dimensions as `z`
8686

8787
```python
8888
import plotly.figure_factory as ff
@@ -203,4 +203,4 @@ fig.show()
203203

204204
#### Reference
205205

206-
For more info on Plotly heatmaps, see: https://plotly.com/python/reference/heatmap/.<br> For more info on using colorscales with Plotly see: https://plotly.com/python/heatmap-and-contour-colorscales/ <br>For more info on `ff.create_annotated_heatmap()`, see the [full function reference](https://plotly.com/python-api-reference/generated/plotly.figure_factory.create_annotated_heatmap.html#plotly.figure_factory.create_annotated_heatmap)
206+
For more info on Plotly heatmaps, see: https://plotly.com/python/reference/heatmap/.<br> For more info on using colorscales with Plotly see: https://plotly.com/python/heatmap-and-contour-colorscales/ <br>For more info on `ff.create_annotated_heatmap()`, see the [full function reference](https://plotly.com/python-api-reference/generated/plotly.figure_factory.create_annotated_heatmap.html#plotly.figure_factory.create_annotated_heatmap)

Diff for: doc/python/axes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The axis type is auto-detected by looking at data from the first [trace](/python
6666

6767
### Forcing an axis to be categorical
6868

69-
It is possible to force the axis type by setting explicitely `xaxis_type`. In the example below the automatic X axis type would be `linear` (because there are not more than twice as many unique strings as unique numbers) but we force it to be `category`.
69+
It is possible to force the axis type by setting explicitly `xaxis_type`. In the example below the automatic X axis type would be `linear` (because there are not more than twice as many unique strings as unique numbers) but we force it to be `category`.
7070

7171
```python
7272
import plotly.express as px
@@ -139,7 +139,7 @@ IFrame(snippet_url + 'axes', width='100%', height=630)
139139

140140
#### Moving Tick Labels Inside the Plot
141141

142-
The `ticklabelposition` attribute moves tick labels inside the plotting area, and modifies the auto-range behaviour to accomodate the labels.
142+
The `ticklabelposition` attribute moves tick labels inside the plotting area, and modifies the auto-range behaviour to accommodate the labels.
143143

144144
```python
145145
import plotly.express as px

Diff for: doc/python/builtin-colorscales.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jupyter:
2323
version: 3.7.6
2424
plotly:
2525
description: A reference for the built-in named continuous (sequential, diverging
26-
and cylclical) color scales in Plotly.
26+
and cyclical) color scales in Plotly.
2727
display_as: file_settings
2828
has_thumbnail: true
2929
ipynb: ~notebook_demo/187

0 commit comments

Comments
 (0)