Skip to content

Commit d4277ac

Browse files
committed
Merge branch 'master' of github.com:plotly/plotly.py into anywidget
2 parents b27643d + 7181c4d commit d4277ac

File tree

6 files changed

+25
-27
lines changed

6 files changed

+25
-27
lines changed

LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The MIT License (MIT)
1+
MIT License
22

3-
Copyright (c) 2016-2018 Plotly, Inc
3+
Copyright (c) 2016-2024 Plotly Technologies Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

doc/python/renderers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ The `plotly_mimetype` renderer creates a specification of the figure (called a M
164164
These are aliases for `plotly_mimetype` since this renderer is a good choice when working in JupyterLab, nteract, and the Visual Studio Code notebook interface. Note that in VSCode Notebooks, the version of Plotly.js that is used to render is provided by the [vscode-python extension](https://code.visualstudio.com/docs/languages/python) and often trails the latest version by several weeks, so the latest features of `plotly` may not be available in VSCode right away. The situation is similar for Nteract.
165165

166166
##### Static Image Renderers
167-
A set of renderers is provided for displaying figures as static images. These renderers all rely on the [orca](https://github.com/plotly/orca) static image export utility. See the [Static Image Export](https://plot.ly/python/static-image-export/) page for more information on getting set up with [orca].
167+
A set of renderers is provided for displaying figures as static images. See the [Static Image Export](https://plot.ly/python/static-image-export/) page for more information on getting set up.
168168

169169
###### `png`, `jpeg`, and `svg`
170170
These renderers display figures as static `.png`, `.jpeg`, and `.svg` files, respectively. These renderers are useful for user interfaces that do not support inline HTML output, but do support inline static images. Examples include the [QtConsole](https://qtconsole.readthedocs.io/en/stable/), [Spyder](https://www.spyder-ide.org/), and the PyCharm [notebook interface](https://www.jetbrains.com/help/pycharm/jupyter-notebook-support.html).

packages/python/chart-studio/chart_studio/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def _get_embed_url(file_owner_or_url, file_id=None):
287287
"The 'file_id' argument must be a non-negative number."
288288
)
289289

290-
if share_key is "":
290+
if share_key == "":
291291
return "{plotly_rest_url}/~{file_owner}/{file_id}.embed".format(
292292
plotly_rest_url=plotly_rest_url, file_owner=file_owner, file_id=file_id
293293
)

packages/python/plotly/plotly/express/_chart_types.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def line(
258258
height=None,
259259
) -> go.Figure:
260260
"""
261-
In a 2D line plot, each row of `data_frame` is represented as vertex of
261+
In a 2D line plot, each row of `data_frame` is represented as a vertex of
262262
a polyline mark in 2D space.
263263
"""
264264
return make_figure(args=locals(), constructor=go.Scatter)
@@ -309,8 +309,8 @@ def area(
309309
) -> go.Figure:
310310
"""
311311
In a stacked area plot, each row of `data_frame` is represented as
312-
vertex of a polyline mark in 2D space. The area between successive
313-
polylines is filled.
312+
a vertex of a polyline mark in 2D space. The area between
313+
successive polylines is filled.
314314
"""
315315
return make_figure(
316316
args=locals(),
@@ -821,7 +821,7 @@ def line_3d(
821821
height=None,
822822
) -> go.Figure:
823823
"""
824-
In a 3D line plot, each row of `data_frame` is represented as vertex of
824+
In a 3D line plot, each row of `data_frame` is represented as a vertex of
825825
a polyline mark in 3D space.
826826
"""
827827
return make_figure(args=locals(), constructor=go.Scatter3d)
@@ -902,7 +902,7 @@ def line_ternary(
902902
) -> go.Figure:
903903
"""
904904
In a ternary line plot, each row of `data_frame` is represented as
905-
vertex of a polyline mark in ternary coordinates.
905+
a vertex of a polyline mark in ternary coordinates.
906906
"""
907907
return make_figure(args=locals(), constructor=go.Scatterternary)
908908

@@ -992,8 +992,8 @@ def line_polar(
992992
height=None,
993993
) -> go.Figure:
994994
"""
995-
In a polar line plot, each row of `data_frame` is represented as vertex
996-
of a polyline mark in polar coordinates.
995+
In a polar line plot, each row of `data_frame` is represented as a
996+
vertex of a polyline mark in polar coordinates.
997997
"""
998998
return make_figure(args=locals(), constructor=go.Scatterpolar)
999999

@@ -1199,7 +1199,7 @@ def line_geo(
11991199
) -> go.Figure:
12001200
"""
12011201
In a geographic line plot, each row of `data_frame` is represented as
1202-
vertex of a polyline mark on a map.
1202+
a vertex of a polyline mark on a map.
12031203
"""
12041204
return make_figure(
12051205
args=locals(),
@@ -1314,7 +1314,7 @@ def density_map(
13141314
) -> go.Figure:
13151315
"""
13161316
In a density map, each row of `data_frame` contributes to the intensity of
1317-
the color of the region around the corresponding point on the map
1317+
the color of the region around the corresponding point on the map.
13181318
"""
13191319
return make_figure(
13201320
args=locals(), constructor=go.Densitymap, trace_patch=dict(radius=radius)
@@ -1350,7 +1350,7 @@ def line_map(
13501350
) -> go.Figure:
13511351
"""
13521352
In a line map, each row of `data_frame` is represented as
1353-
vertex of a polyline mark on the map.
1353+
a vertex of a polyline mark on the map.
13541354
"""
13551355
return make_figure(args=locals(), constructor=go.Scattermap)
13561356

@@ -1497,7 +1497,7 @@ def line_mapbox(
14971497
) -> go.Figure:
14981498
"""
14991499
In a Mapbox line plot, each row of `data_frame` is represented as
1500-
vertex of a polyline mark on a Mapbox map.
1500+
a vertex of a polyline mark on a Mapbox map.
15011501
"""
15021502
return make_figure(args=locals(), constructor=go.Scattermapbox)
15031503

packages/python/plotly/plotly/express/_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ def process_args_into_dataframe(args, wide_mode, var_name, value_name):
12361236
raise ValueError(
12371237
"All arguments should have the same length. "
12381238
"The length of column argument `df[%s]` is %d, whereas the "
1239-
"length of previously-processed arguments %s is %d"
1239+
"length of previously-processed arguments %s is %d"
12401240
% (
12411241
field,
12421242
len(df_input[argument]),
@@ -1274,7 +1274,7 @@ def process_args_into_dataframe(args, wide_mode, var_name, value_name):
12741274
raise ValueError(
12751275
"All arguments should have the same length. "
12761276
"The length of argument `%s` is %d, whereas the "
1277-
"length of previously-processed arguments %s is %d"
1277+
"length of previously-processed arguments %s is %d"
12781278
% (field, len(argument), str(list(df_output.keys())), length)
12791279
)
12801280
df_output[str(col_name)] = to_unindexed_series(argument, str(col_name))

test/percy/plotly-express.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384

385385

386386
carshare = px.data.carshare()
387-
fig = px.scatter_mapbox(
387+
fig = px.scatter_map(
388388
carshare,
389389
lat="centroid_lat",
390390
lon="centroid_lon",
@@ -394,14 +394,12 @@
394394
size_max=15,
395395
zoom=10,
396396
)
397-
fig.write_html(os.path.join(dir_name, "scatter_mapbox.html"))
397+
fig.write_html(os.path.join(dir_name, "scatter_map.html"))
398398

399399

400400
carshare = px.data.carshare()
401-
fig = px.line_mapbox(
402-
carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour"
403-
)
404-
fig.write_html(os.path.join(dir_name, "line_mapbox.html"))
401+
fig = px.line_map(carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour")
402+
fig.write_html(os.path.join(dir_name, "line_map.html"))
405403

406404

407405
sample_geojson = {
@@ -419,23 +417,23 @@
419417
}
420418
],
421419
}
422-
fig = px.choropleth_mapbox(
420+
fig = px.choropleth_map(
423421
geojson=sample_geojson,
424422
locations=["the_polygon"],
425423
color=[10],
426424
zoom=6,
427425
)
428-
fig.write_html(os.path.join(dir_name, "choropleth_mapbox.html"), auto_play=False)
426+
fig.write_html(os.path.join(dir_name, "choropleth_map.html"), auto_play=False)
429427

430428

431429
carshare = px.data.carshare()
432-
fig = px.density_mapbox(
430+
fig = px.density_map(
433431
carshare,
434432
lat="centroid_lat",
435433
lon="centroid_lon",
436434
z="peak_hour",
437435
)
438-
fig.write_html(os.path.join(dir_name, "density_mapbox.html"), auto_play=False)
436+
fig.write_html(os.path.join(dir_name, "density_map.html"), auto_play=False)
439437

440438

441439
gapminder = px.data.gapminder()

0 commit comments

Comments
 (0)