Skip to content

Commit 2652b70

Browse files
committed
Revert "removed 3d and mapbox percy tests"
This reverts commit fb83b64.
1 parent d61e9cd commit 2652b70

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

Diff for: test/percy/plotly-express.py

+48
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,31 @@
314314
)
315315
fig.write_html(os.path.join(dir_name, "line_ternary.html"))
316316

317+
# #### 3D Coordinates
318+
319+
import plotly.express as px
320+
321+
election = px.data.election()
322+
fig = px.scatter_3d(
323+
election,
324+
x="Joly",
325+
y="Coderre",
326+
z="Bergeron",
327+
color="winner",
328+
size="total",
329+
hover_name="district",
330+
symbol="result",
331+
color_discrete_map={"Joly": "blue", "Bergeron": "green", "Coderre": "red"},
332+
)
333+
fig.write_html(os.path.join(dir_name, "scatter_3d.html"))
334+
335+
import plotly.express as px
336+
337+
election = px.data.election()
338+
fig = px.line_3d(
339+
election, x="Joly", y="Coderre", z="Bergeron", color="winner", line_dash="winner"
340+
)
341+
fig.write_html(os.path.join(dir_name, "line_3d.html"))
317342

318343
# #### Polar Coordinates
319344

@@ -360,6 +385,29 @@
360385

361386
import plotly.express as px
362387

388+
carshare = px.data.carshare()
389+
fig = px.scatter_mapbox(
390+
carshare,
391+
lat="centroid_lat",
392+
lon="centroid_lon",
393+
color="peak_hour",
394+
size="car_hours",
395+
color_continuous_scale=px.colors.cyclical.IceFire,
396+
size_max=15,
397+
zoom=10,
398+
)
399+
fig.write_html(os.path.join(dir_name, "scatter_mapbox.html"))
400+
401+
import plotly.express as px
402+
403+
carshare = px.data.carshare()
404+
fig = px.line_mapbox(
405+
carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour"
406+
)
407+
fig.write_html(os.path.join(dir_name, "line_mapbox.html"))
408+
409+
import plotly.express as px
410+
363411
gapminder = px.data.gapminder()
364412
fig = px.scatter_geo(
365413
gapminder,

0 commit comments

Comments
 (0)