From f1e0c7aa26820b5e9fa00cc5b856d6718ff953e7 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 30 Aug 2024 09:56:39 -0400 Subject: [PATCH 1/2] update tests to use new maps --- test/percy/plotly-express.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/percy/plotly-express.py b/test/percy/plotly-express.py index 49d3fdb8249..0c9a3c4d5b5 100644 --- a/test/percy/plotly-express.py +++ b/test/percy/plotly-express.py @@ -384,7 +384,7 @@ carshare = px.data.carshare() -fig = px.scatter_mapbox( +fig = px.scatter_map( carshare, lat="centroid_lat", lon="centroid_lon", @@ -394,14 +394,14 @@ size_max=15, zoom=10, ) -fig.write_html(os.path.join(dir_name, "scatter_mapbox.html")) +fig.write_html(os.path.join(dir_name, "scatter_map.html")) carshare = px.data.carshare() -fig = px.line_mapbox( +fig = px.line_map( carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour" ) -fig.write_html(os.path.join(dir_name, "line_mapbox.html")) +fig.write_html(os.path.join(dir_name, "line_map.html")) sample_geojson = { @@ -419,23 +419,23 @@ } ], } -fig = px.choropleth_mapbox( +fig = px.choropleth_map( geojson=sample_geojson, locations=["the_polygon"], color=[10], zoom=6, ) -fig.write_html(os.path.join(dir_name, "choropleth_mapbox.html"), auto_play=False) +fig.write_html(os.path.join(dir_name, "choropleth_map.html"), auto_play=False) carshare = px.data.carshare() -fig = px.density_mapbox( +fig = px.density_map( carshare, lat="centroid_lat", lon="centroid_lon", z="peak_hour", ) -fig.write_html(os.path.join(dir_name, "density_mapbox.html"), auto_play=False) +fig.write_html(os.path.join(dir_name, "density_map.html"), auto_play=False) gapminder = px.data.gapminder() From 42fca9195373f4a7e39d739b6c3f9ac62ff643be Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 30 Aug 2024 10:47:02 -0400 Subject: [PATCH 2/2] format code --- test/percy/plotly-express.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/percy/plotly-express.py b/test/percy/plotly-express.py index 0c9a3c4d5b5..428e30572e4 100644 --- a/test/percy/plotly-express.py +++ b/test/percy/plotly-express.py @@ -398,9 +398,7 @@ carshare = px.data.carshare() -fig = px.line_map( - carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour" -) +fig = px.line_map(carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour") fig.write_html(os.path.join(dir_name, "line_map.html"))