Skip to content

Commit 565a92c

Browse files
authored
Merge branch 'main' into update-hexbin-map-no-mapbox
2 parents b9a271d + aa4c088 commit 565a92c

27 files changed

+785
-683
lines changed

.github/workflows/check-js-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
cd js
3030
npm ci
3131
npm run build
32+
npm ls
3233
- name: Check JupyterLab build artifacts
3334
run: |
3435
# 1. Hash contents of all static files, sort by content hash

codegen/resources/plot-schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4008,7 +4008,7 @@
40084008
"valType": "string"
40094009
},
40104010
"type": {
4011-
"description": "Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. but note that *line* and *fill* are not compatible with Point GeoJSON geometries. With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed.",
4011+
"description": "Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. but note that *line* and *fill* are not compatible with Point GeoJSON geometries. With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. With `sourcetype` set to *raster* or *image*, only the *raster* value is allowed.",
40124012
"dflt": "circle",
40134013
"editType": "plot",
40144014
"valType": "enumerated",
@@ -4414,7 +4414,7 @@
44144414
"valType": "string"
44154415
},
44164416
"type": {
4417-
"description": "Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. but note that *line* and *fill* are not compatible with Point GeoJSON geometries. With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed.",
4417+
"description": "Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. but note that *line* and *fill* are not compatible with Point GeoJSON geometries. With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. With `sourcetype` set to *raster* or *image*, only the *raster* value is allowed.",
44184418
"dflt": "circle",
44194419
"editType": "plot",
44204420
"valType": "enumerated",
@@ -47932,7 +47932,7 @@
4793247932
"valType": "number"
4793347933
},
4793447934
"source": {
47935-
"description": "Specifies the data URI of the image to be visualized. The URI consists of \"data:image/[<media subtype>][;base64],<data>\"",
47935+
"description": "Specifies the data URI of the image to be visualized. The URI consists of \"data:image/[<media subtype\\\\>][;base64\\\\],<data\\\\>\"",
4793647936
"editType": "calc",
4793747937
"valType": "string"
4793847938
},
@@ -53288,7 +53288,7 @@
5328853288
]
5328953289
},
5329053290
"hovertemplate": {
53291-
"description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. This value here applies when hovering over dimensions. Note that `*categorycount`, *colorcount* and *bandcolorcount* are only available when `hoveron` contains the *color* flagFinally, the template string has access to variables `count`, `probability`, `category`, `categorycount`, `colorcount` and `bandcolorcount`. Anything contained in tag `<extra>` is displayed in the secondary box, for example `<extra>%{fullData.name}</extra>`. To hide the secondary box completely, use an empty tag `<extra></extra>`.",
53291+
"description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. This value here applies when hovering over dimensions. Note that *categorycount*, *colorcount* and *bandcolorcount* are only available when `hoveron` contains the *color* flag. Finally, the template string has access to variables `count`, `probability`, `category`, `categorycount`, `colorcount` and `bandcolorcount`. Anything contained in tag `<extra>` is displayed in the secondary box, for example `<extra>%{fullData.name}</extra>`. To hide the secondary box completely, use an empty tag `<extra></extra>`.",
5329253292
"dflt": "",
5329353293
"editType": "plot",
5329453294
"valType": "string"

commands.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ def update_plotlyjs_dev(args, outdir):
296296
perform_codegen(outdir)
297297

298298

299-
def parse_args():
300-
"""Parse command-line arguments."""
299+
def make_parser():
300+
"""Make argument parser."""
301301

302302
parser = argparse.ArgumentParser()
303303
subparsers = parser.add_subparsers(dest="cmd", help="Available subcommands")
@@ -322,6 +322,11 @@ def parse_args():
322322

323323
subparsers.add_parser("updateplotlyjs", help="update plotly.js")
324324

325+
return parser
326+
327+
328+
def parse_args(parser: argparse.ArgumentParser):
329+
"""Parse command line arguments."""
325330
return parser.parse_args()
326331

327332

@@ -331,7 +336,8 @@ def main():
331336
project_root = os.path.dirname(os.path.realpath(__file__))
332337
outdir = os.path.join(project_root, "plotly")
333338

334-
args = parse_args()
339+
parser = make_parser()
340+
args = parse_args(parser)
335341

336342
if args.cmd == "codegen":
337343
perform_codegen(outdir, noformat=args.noformat)
@@ -350,6 +356,10 @@ def main():
350356
print(version)
351357
update_plotlyjs(version, outdir)
352358

359+
elif args.cmd is None:
360+
parser.print_help()
361+
sys.exit(1)
362+
353363
else:
354364
print(f"unknown command {args.cmd}", file=sys.stderr)
355365
sys.exit(1)

doc/python/imshow.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.2'
9-
jupytext_version: 1.4.2
8+
format_version: '1.3'
9+
jupytext_version: 1.17.2
1010
kernelspec:
11-
display_name: Python 3
11+
display_name: Python 3 (ipykernel)
1212
language: python
1313
name: python3
1414
language_info:
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.7.7
23+
version: 3.12.0
2424
plotly:
2525
description: How to display image data in Python with Plotly.
2626
display_as: scientific
@@ -61,7 +61,7 @@ In order to create a numerical array to be passed to `px.imshow`, you can use a
6161
```python
6262
import plotly.express as px
6363
from skimage import io
64-
img = io.imread('https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Crab_Nebula.jpg/240px-Crab_Nebula.jpg')
64+
img = io.imread('https://user-images.githubusercontent.com/72614349/179115668-2630e3e4-3a9f-4c88-9494-3412e606450a.jpg')
6565
fig = px.imshow(img)
6666
fig.show()
6767
```

doc/python/plotly-express.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.3'
9-
jupytext_version: 1.14.7
9+
jupytext_version: 1.17.2
1010
kernelspec:
1111
display_name: Python 3 (ipykernel)
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.10.4
23+
version: 3.12.0
2424
plotly:
2525
description: Plotly Express is a terse, consistent, high-level API for creating
2626
figures.
@@ -386,7 +386,7 @@ fig.show()
386386
```python
387387
import plotly.express as px
388388
from skimage import io
389-
img = io.imread('https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Crab_Nebula.jpg/240px-Crab_Nebula.jpg')
389+
img = io.imread('https://user-images.githubusercontent.com/72614349/179115668-2630e3e4-3a9f-4c88-9494-3412e606450a.jpg')
390390
fig = px.imshow(img)
391391
fig.show()
392392
```

doc/python/tile-scatter-maps.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.3'
9-
jupytext_version: 1.16.3
9+
jupytext_version: 1.16.4
1010
kernelspec:
1111
display_name: Python 3 (ipykernel)
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.10.0
23+
version: 3.9.16
2424
plotly:
2525
description: How to make scatter plots on tile maps in Python.
2626
display_as: maps
@@ -220,6 +220,34 @@ fig.update_layout(
220220
fig.show()
221221
```
222222

223+
#### Supported Symbols
224+
225+
Plotly uses [Maki v2.1.0](https://app.unpkg.com/maki@2.1.0/files/icons) for symbols and supports the following values for `symbol`:
226+
227+
"aerialway", "airfield", "airport", "alcohol-shop", "america-football",
228+
"amusement-park", "aquarium", "art-gallery", "attraction", "bakery",
229+
"bank", "bar", "baseball", "basketball", "beer", "bicycle", "bicycle-share",
230+
"blood-bank", "buddhism", "building", "bus", "cafe", "campsite", "car",
231+
"castle", "cemetery", "central-building", "cinema", "circle", "circle-stroked",
232+
"clothing-store", "college", "commercial", "cricket", "cross", "dam",
233+
"danger", "dentist", "doctor", "dog-park", "drinking-water", "embassy",
234+
"entrance", "farm", "fast-food", "ferry", "fire-station", "fuel", "gaming",
235+
"garden", "garden-center", "gift", "golf", "grocery", "hairdresser",
236+
"harbor", "heart", "heliport", "hospital", "ice-cream", "industry",
237+
"information", "karaoke", "landmark", "laundry", "library", "lighthouse",
238+
"lodging", "marker", "monument", "mountain", "museum", "music", "park",
239+
"parking", "parking-garage", "pharmacy", "picnic-site", "pitch",
240+
"place-of-worship", "playground", "police", "post", "prison", "rail",
241+
"rail-light", "rail-metro", "ranger-station", "religious-christian",
242+
"religious-jewish", "religious-muslim", "residential-community",
243+
"restaurant", "roadblock", "rocket", "school", "shelter", "shop",
244+
"skiing", "soccer", "square", "square-stroked", "stadium", "star",
245+
"star-stroked", "suitcase", "sushi", "swimming", "teahouse", "telephone",
246+
"tennis", "theatre", "toilet", "town-hall", "triangle", "triangle-stroked",
247+
"veterinary", "volcano", "warehouse", "waste-basket", "water", "wetland",
248+
"wheelchair", "zoo"
249+
250+
223251
#### Add Clusters
224252

225253
*New in 5.11*

js/lib/mimeExtension.js

Lines changed: 232 additions & 229 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"dependencies": {
2121
"lodash-es": "^4.17.21",
22-
"plotly.js": "3.1.0",
22+
"plotly.js": "3.1.1",
2323
"@lumino/widgets": "~2.4.0"
2424
},
2525
"devDependencies": {

plotly/figure_factory/_ternary_contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def _contour_trace(
382382
ncontours=None,
383383
colorscale="Electric",
384384
linecolor="rgb(150,150,150)",
385-
interp_mode="llr",
385+
interp_mode="ilr",
386386
coloring=None,
387387
v_min=0,
388388
v_max=1,

0 commit comments

Comments
 (0)