Skip to content

Commit a6fed9b

Browse files
merge doc-prod into master
2 parents 18c5643 + fc2c938 commit a6fed9b

File tree

118 files changed

+2055
-432
lines changed

Some content is hidden

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

118 files changed

+2055
-432
lines changed

Diff for: .circleci/config.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ jobs:
374374
docker:
375375
# specify the version you desire here
376376
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
377-
- image: circleci/python:3.6.8-node
377+
- image: circleci/python:3.7-stretch-node-browsers
378378

379379
working_directory: ~/project
380380

@@ -400,12 +400,13 @@ jobs:
400400
. venv/bin/activate
401401
npm install [email protected]
402402
npm install orca
403+
pip install -U pip
403404
pip uninstall -y plotly
404405
pip install -r requirements.txt
405406
if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then
406407
pip uninstall -y plotly
407408
cd ../packages/python/plotly
408-
python3 setup.py install
409+
pip install -e .
409410
cd ../../../doc
410411
fi
411412
echo 'export PATH="/home/circleci/project/doc/node_modules/.bin:$PATH"' >> $BASH_ENV
@@ -463,6 +464,15 @@ jobs:
463464
command: |
464465
cd doc
465466
. venv/bin/activate
467+
# For the API doc, we need to use the local version of plotly
468+
# since we are tweaking the source because of
469+
# graph_objs/graph_objects
470+
if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
471+
pip uninstall -y plotly
472+
cd ../packages/python/plotly
473+
pip install -e .
474+
cd ../../../doc
475+
fi
466476
cd apidoc
467477
make html
468478
if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
@@ -478,12 +488,14 @@ jobs:
478488
rm -rf .git
479489
cd ../..
480490
fi
481-
482491
cd ../..
483492
484493
- store_artifacts:
485494
path: doc/build
486495
destination: doc/build
496+
- store_artifacts:
497+
path: doc/apidoc/_build/
498+
destination: doc/apidoc/_build/
487499

488500
workflows:
489501
version: 2

Diff for: binder/requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ datashader
1616
pyarrow
1717
cufflinks==0.17.3
1818
kaleido
19+
scikit-learn
20+
umap-learn

Diff for: doc/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ $(HTML_DIR)/2019-07-03-%.html: $(IPYNB_DIR)/%.ipynb
3838
@mkdir -p $(FAIL_DIR)
3939
@echo "[nbconvert] $<"
4040
@jupyter nbconvert $< --to html --template nb.tpl \
41+
--ExecutePreprocessor.timeout=600\
4142
--output-dir $(HTML_DIR) --output 2019-07-03-$*.html \
4243
--execute > $(FAIL_DIR)/$* 2>&1 && rm -f $(FAIL_DIR)/$*
4344

Diff for: doc/apidoc/Makefile

+11-4
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,24 @@ help:
2222
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*/*.py
2323
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*/*/*.py
2424
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*/*/*/*.py
25+
# Copy _plotly_utils file so that they appear in the API doc
2526
cp ../../packages/python/plotly/_plotly_utils/colors/sequential.py ../../packages/python/plotly/_plotly_utils/colors/diverging.py ../../packages/python/plotly/_plotly_utils/colors/qualitative.py ../../packages/python/plotly/_plotly_utils/colors/cyclical.py ../../packages/python/plotly/_plotly_utils/colors/colorbrewer.py ../../packages/python/plotly/_plotly_utils/colors/carto.py ../../packages/python/plotly/_plotly_utils/colors/cmocean.py ../../packages/python/plotly/plotly/colors
2627
cp ../../packages/python/plotly/_plotly_utils/colors/sequential.py ../../packages/python/plotly/_plotly_utils/colors/diverging.py ../../packages/python/plotly/_plotly_utils/colors/qualitative.py ../../packages/python/plotly/_plotly_utils/colors/cyclical.py ../../packages/python/plotly/_plotly_utils/colors/colorbrewer.py ../../packages/python/plotly/_plotly_utils/colors/carto.py ../../packages/python/plotly/_plotly_utils/colors/cmocean.py ../../packages/python/plotly/plotly/express/colors
28+
# Run sphinx-apidoc script to create hierarchy of rst files to generate
29+
# docstrings. The first path is the one to process, the following ones
30+
# are excluded from the search.
31+
rm -rf _build generated
2732
sphinx-apidoc -M -o generated ../../packages/python/plotly/plotly ../../packages/python/plotly/plotly/validators ../../packages/python/plotly/plotly/tests ../../packages/python/plotly/plotly/matplotlylib/ ../../packages/python/plotly/plotly/offline ../../packages/python/plotly/plotly/api
33+
# Run sphinx-build to build html pages from the rst pages
2834
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2935
git checkout -- ../../packages/python/plotly/plotly/graph_objs
36+
# Remove files which were added only for docstring generation
3037
rm ../../packages/python/plotly/plotly/colors/diverging.py ../../packages/python/plotly/plotly/colors/sequential.py ../../packages/python/plotly/plotly/colors/qualitative.py ../../packages/python/plotly/plotly/colors/cyclical.py ../../packages/python/plotly/plotly/colors/colorbrewer.py ../../packages/python/plotly/plotly/colors/carto.py ../../packages/python/plotly/plotly/colors/cmocean.py
3138
rm ../../packages/python/plotly/plotly/express/colors/diverging.py ../../packages/python/plotly/plotly/express/colors/sequential.py ../../packages/python/plotly/plotly/express/colors/qualitative.py ../../packages/python/plotly/plotly/express/colors/cyclical.py ../../packages/python/plotly/plotly/express/colors/colorbrewer.py ../../packages/python/plotly/plotly/express/colors/carto.py ../../packages/python/plotly/plotly/express/colors/cmocean.py
3239
rename 's/graph_objs/graph_objects/' _build/html/*.html _build/html/generated/*.html
3340
mv _build/html/generated/plotly.graph_objs.html _build/html/generated/plotly.graph_objects.html
34-
sed -i 's/graph_objs/graph_objects/g' _build/html/*.html
35-
sed -i 's/graph_objs/graph_objects/g' _build/html/*.inv
36-
sed -i 's/graph_objs/graph_objects/g' _build/html/*.js
37-
sed -i 's/graph_objs/graph_objects/g' _build/html/generated/*.html
41+
sed -i 's/graph_objs/graph_objects/g' _build/html/*.html
42+
sed -i 's/graph_objs/graph_objects/g' _build/html/*.inv
43+
sed -i 's/graph_objs/graph_objects/g' _build/html/*.js
44+
sed -i 's/graph_objs/graph_objects/g' _build/html/generated/*.html
3845
sed -i 's/graph_objs/graph_objects/g' _build/html/generated/generated/*.html

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

+2-2
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-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-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 seperatly, set [ybins](https://plotly.com/python/reference/histogram2dcontour/#histogram2dcontour-ybins) and `xbins`.
141141

142142
```python
143143
import plotly.graph_objects as go
@@ -236,4 +236,4 @@ fig.show()
236236
```
237237

238238
#### Reference
239-
See https://plotly.com/python/reference/#histogram2d for more information and chart attribute options!
239+
See https://plotly.com/python/reference/histogram2d/ for more information and chart attribute options!

Diff for: doc/python/2d-histogram-contour.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,4 @@ fig.show()
249249
```
250250

251251
#### Reference
252-
See https://plotly.com/python/reference/#histogram2dcontour for more information and chart attribute options!
252+
See https://plotly.com/python/reference/histogram2dcontour/ for more information and chart attribute options!

Diff for: doc/python/3d-bubble-charts.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ fig = go.Figure(data=go.Scatter3d(
107107
mode = 'markers',
108108
marker = dict(
109109
sizemode = 'diameter',
110-
sizeref = 750, # info on sizeref: https://plotly.com/python/reference/#scatter-marker-sizeref
110+
sizeref = 750, # info on sizeref: https://plotly.com/python/reference/scatter/#scatter-marker-sizeref
111111
size = planet_diameter,
112112
color = planet_colors,
113113
)
@@ -146,7 +146,7 @@ fig = go.Figure(go.Scatter3d(
146146
mode = 'markers',
147147
marker = dict(
148148
sizemode = 'diameter',
149-
sizeref = 750, # info on sizeref: https://plotly.com/python/reference/#scatter-marker-sizeref
149+
sizeref = 750, # info on sizeref: https://plotly.com/python/reference/scatter/#scatter-marker-sizeref
150150
size = planet_diameter,
151151
color = temperatures,
152152
colorbar_title = 'Mean<br>Temperature',
@@ -166,4 +166,4 @@ fig.show()
166166

167167
#### Reference
168168

169-
See https://plotly.com/python/reference/#scatter3d and https://plotly.com/python/reference/#scatter-marker-sizeref <br>for more information and chart attribute options!
169+
See https://plotly.com/python/reference/scatter3d/ and https://plotly.com/python/reference/scatter/#scatter-marker-sizeref <br>for more information and chart attribute options!

Diff for: doc/python/3d-camera-controls.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,4 @@ fig.show()
290290
#### Reference
291291

292292

293-
See https://plotly.com/python/reference/#layout-scene-camera for more information and chart attribute options!
293+
See https://plotly.com/python/reference/layout/scene/#layout-scene-camera for more information and chart attribute options!

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -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-line-plots.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ fig.show()
120120

121121
#### Reference
122122

123-
See https://plotly.com/python/reference/#scatter3d-marker-line for more information and chart attribute options!
123+
See https://plotly.com/python/reference/scatter3d/#scatter3d-marker-line for more information and chart attribute options!

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,4 @@ fig.show()
163163
```
164164

165165
## Reference
166-
See https://plotly.com/python/reference/#mesh3d for more information and chart attribute options!
166+
See https://plotly.com/python/reference/mesh3d/ for more information and chart attribute options!

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ fig.show()
122122

123123
#### Reference
124124

125-
See https://plotly.com/python/reference/#scatter3d for more information and chart attribute options!
125+
See https://plotly.com/python/reference/scatter3d/ for more information and chart attribute options!

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fig.show()
7777
#### Surface Plot With Contours
7878

7979

80-
Display and customize contour data for each axis using the `contours` attribute ([reference](plotly.com/python/reference/#surface-contours)).
80+
Display and customize contour data for each axis using the `contours` attribute ([reference](plotly.com/python/reference/surface/#surface-contours)).
8181

8282
```python
8383
import plotly.graph_objects as go
@@ -99,7 +99,7 @@ fig.update_layout(title='Mt Bruno Elevation', autosize=False,
9999
fig.show()
100100
```
101101
#### Configure Surface Contour Levels
102-
This example shows how to slice the surface graph on the desired position for each of x, y and z axis. [contours.x.start](https://plotly.com/python/reference/#surface-contours-x-start) sets the starting contour level value, `end` sets the end of it, and `size` sets the step between each contour level.
102+
This example shows how to slice the surface graph on the desired position for each of x, y and z axis. [contours.x.start](https://plotly.com/python/reference/surface/#surface-contours-x-start) sets the starting contour level value, `end` sets the end of it, and `size` sets the step between each contour level.
103103

104104
```python
105105
import plotly.graph_objects as go
@@ -196,4 +196,4 @@ fig.show()
196196
#### Reference
197197

198198

199-
See https://plotly.com/python/reference/#surface for more information!
199+
See https://plotly.com/python/reference/surface/ for more information!

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ fig.show()
254254
```
255255

256256
#### Reference
257-
See https://plotly.com/python/reference/#volume for more information and chart attribute options!
257+
See https://plotly.com/python/reference/volume/ for more information and chart attribute options!
258258

259259
#### See also
260260
[3D isosurface documentation](/python/3d-isosurface-plots/)

Diff for: doc/python/animations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Along with `data` and `layout`, `frames` can be added as a key in a figure objec
6969

7070
#### Adding Control Buttons to Animations
7171

72-
You can add play and pause buttons to control your animated charts by adding an `updatemenus` array to the `layout` of your `figure`. More information on style and placement of the buttons is available in Plotly's [`updatemenus` reference](https://plotly.com/python/reference/#layout-updatemenus).
72+
You can add play and pause buttons to control your animated charts by adding an `updatemenus` array to the `layout` of your `figure`. More information on style and placement of the buttons is available in Plotly's [`updatemenus` reference](https://plotly.com/python/reference/layout/updatemenus/).
7373
<br>
7474
The buttons are defined as follows:
7575

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -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

+9-9
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ jupyter:
2929
language: python
3030
layout: base
3131
name: Axes
32-
order: 13
32+
order: 14
3333
permalink: python/axes/
3434
thumbnail: thumbnail/axes.png
3535
---
3636

37-
This tutorial explain how to set the properties of 2-dimensional Cartesian axes, namely [`go.layout.XAxis`](/python/reference/#layout-xaxis) and [`go.layout.YAxis`](python/reference/#layout-xaxis). Other kinds of axes are described in other tutorials:
37+
This tutorial explain how to set the properties of 2-dimensional Cartesian axes, namely [`go.layout.XAxis`](/python/reference/layout/xaxis/) and [`go.layout.YAxis`](python/reference/layout/xaxis/). Other kinds of axes are described in other tutorials:
3838

39-
- [3D axes](/python/3d-axes) The axis object is [`go.layout.Scene`](/python/reference/#layout-scene)
40-
- [Polar axes](/python/polar-chart/). The axis object is [`go.layout.Polar`](/python/reference/#layout-polar)
41-
- [Ternary axes](/python/ternary-plots). The axis object is [`go.layout.Ternary`](/python/reference/#layout-ternary)
42-
- [Geo axes](/python/map-configuration/). The axis object is [`go.layout.Geo`](/python/reference/#layout-geo)
43-
- [Mapbox axes](/python/mapbox-layers/). The axis object is [`go.layout.Mapbox`](/python/reference/#layout-mapbox)
44-
- [Color axes](/python/colorscales/). The axis object is [`go.layout.Coloraxis`](/python/reference/#layout-coloraxis).
39+
- [3D axes](/python/3d-axes) The axis object is [`go.layout.Scene`](/python/reference/layout/scene/)
40+
- [Polar axes](/python/polar-chart/). The axis object is [`go.layout.Polar`](/python/reference/layout/polar/)
41+
- [Ternary axes](/python/ternary-plots). The axis object is [`go.layout.Ternary`](/python/reference/layout/ternary/)
42+
- [Geo axes](/python/map-configuration/). The axis object is [`go.layout.Geo`](/python/reference/layout/geo/)
43+
- [Mapbox axes](/python/mapbox-layers/). The axis object is [`go.layout.Mapbox`](/python/reference/layout/mapbox/)
44+
- [Color axes](/python/colorscales/). The axis object is [`go.layout.Coloraxis`](/python/reference/layout/coloraxis/).
4545

4646
**See also** the tutorials on [subplots](/python/subplots) and [multiple axes](/python/multiple-axes/).
4747

@@ -777,4 +777,4 @@ fig.show()
777777

778778
#### Reference
779779

780-
See https://plotly.com/python/reference/#layout-xaxis and https://plotly.com/python/reference/#layout-yaxis for more information and chart attribute options!
780+
See https://plotly.com/python/reference/layout/xaxis/ and https://plotly.com/python/reference/layout/yaxis/ for more information and chart attribute options!

Diff for: doc/python/bar-charts.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ fig.show()
372372

373373
### Bar Chart with Sorted or Ordered Categories
374374

375-
Set `categoryorder` to `"category ascending"` or `"category descending"` for the alphanumerical order of the category names or `"total ascending"` or `"total descending"` for numerical order of values. [categoryorder](https://plotly.com/python/reference/#layout-xaxis-categoryorder) for more information. Note that sorting the bars by a particular trace isn't possible right now - it's only possible to sort by the total values. Of course, you can always sort your data _before_ plotting it if you need more customization.
375+
Set `categoryorder` to `"category ascending"` or `"category descending"` for the alphanumerical order of the category names or `"total ascending"` or `"total descending"` for numerical order of values. [categoryorder](https://plotly.com/python/reference/layout/xaxis/#layout-xaxis-categoryorder) for more information. Note that sorting the bars by a particular trace isn't possible right now - it's only possible to sort by the total values. Of course, you can always sort your data _before_ plotting it if you need more customization.
376376

377377
This example orders the bar chart alphabetically with `categoryorder: 'category ascending'`
378378

@@ -442,4 +442,4 @@ fig.show()
442442

443443
### Reference
444444

445-
See https://plotly.com/python/reference/#bar for more information and chart attribute options!
445+
See https://plotly.com/python/reference/bar/ for more information and chart attribute options!

Diff for: doc/python/box-plots.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fig.show()
134134

135135
## Box plot with go.Box
136136

137-
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Box` class from `plotly.graph_objects`](/python/graph-objects/). All available options for `go.Box` are described in the reference page https://plotly.com/python/reference/#box.
137+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Box` class from `plotly.graph_objects`](/python/graph-objects/). All available options for `go.Box` are described in the reference page https://plotly.com/python/reference/box/.
138138

139139
### Basic Box Plot
140140

@@ -502,4 +502,4 @@ fig.show()
502502

503503
#### Reference
504504

505-
See https://plotly.com/python/reference/#box for more information and chart attribute options!
505+
See https://plotly.com/python/reference/box/ for more information and chart attribute options!

Diff for: doc/python/bubble-charts.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ fig.show()
9191

9292
To scale the bubble size, use the attribute `sizeref`. We recommend using the following formula to calculate a `sizeref` value:<br>
9393
`sizeref = 2. * max(array of size values) / (desired maximum marker size ** 2)`<br>
94-
Note that setting 'sizeref' to a value greater than 1, decreases the rendered marker sizes, while setting 'sizeref' to less than 1, increases the rendered marker sizes. See https://plotly.com/python/reference/#scatter-marker-sizeref for more information.
95-
Additionally, we recommend setting the sizemode attribute: https://plotly.com/python/reference/#scatter-marker-sizemode to area.
94+
Note that setting 'sizeref' to a value greater than 1, decreases the rendered marker sizes, while setting 'sizeref' to less than 1, increases the rendered marker sizes. See https://plotly.com/python/reference/scatter/#scatter-marker-sizeref for more information.
95+
Additionally, we recommend setting the sizemode attribute: https://plotly.com/python/reference/scatter/#scatter-marker-sizemode to area.
9696

9797
```python
9898
import plotly.graph_objects as go
@@ -222,4 +222,4 @@ fig.show()
222222

223223
### Reference
224224

225-
See https://plotly.com/python/reference/#scatter for more information and chart attribute options!
225+
See https://plotly.com/python/reference/scatter/ for more information and chart attribute options!

0 commit comments

Comments
 (0)