From 791c4899231e7c5622247871fc9d77f971b93040 Mon Sep 17 00:00:00 2001 From: Benoit Figuet <35493466+figuetbe@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:18:08 +0100 Subject: [PATCH] Plotly update - doc fixed (#476) --- docs/visualize/plotly.rst | 6 +++--- src/traffic/core/flight.py | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/visualize/plotly.rst b/docs/visualize/plotly.rst index 68592a55..15ed8ebc 100644 --- a/docs/visualize/plotly.rst +++ b/docs/visualize/plotly.rst @@ -59,7 +59,7 @@ All kwargs arguments are passed directly to the corresponding method. ) It is also possible to combine elements by constructing a -:class:`~plotly.graph_objects.Scattermapbox` object: +:class:`~plotly.graph_objects.Scattermap` object: .. jupyter-execute:: @@ -79,7 +79,7 @@ It is also possible to combine elements by constructing a ) fig.add_trace( - belevingsvlucht.Scattermapbox( + belevingsvlucht.Scattermap( mode="lines", line=dict(color="#f58518", width=1), showlegend=False, @@ -90,7 +90,7 @@ It is also possible to combine elements by constructing a width=600, height=600, margin=dict(l=50, r=0, t=40, b=40), - mapbox=dict( + map=dict( style="carto-positron", zoom=7, center=airports["EHLE"].latlon_dict, diff --git a/src/traffic/core/flight.py b/src/traffic/core/flight.py index 0a55ef25..e81dba0c 100644 --- a/src/traffic/core/flight.py +++ b/src/traffic/core/flight.py @@ -2999,7 +2999,15 @@ def line_geo(self, **kwargs: Any) -> "go.Figure": raise ImportError("Install plotly or traffic with the plotly extension") def line_map( +<<<<<<< HEAD +<<<<<<< HEAD self, map_style: str = "carto-positron", **kwargs: Any +======= + self, mapbox_style: str = "carto-positron", **kwargs: Any +>>>>>>> 3e6901d (Plotly switch from mapbox to maplibre) +======= + self, map_style: str = "carto-positron", **kwargs: Any +>>>>>>> 339371b (swith mapbox to map) ) -> "go.Figure": raise ImportError("Install plotly or traffic with the plotly extension") @@ -3007,7 +3015,15 @@ def scatter_geo(self, **kwargs: Any) -> "go.Figure": raise ImportError("Install plotly or traffic with the plotly extension") def scatter_map( +<<<<<<< HEAD +<<<<<<< HEAD + self, map_style: str = "carto-positron", **kwargs: Any +======= + self, mapbox_style: str = "carto-positron", **kwargs: Any +>>>>>>> 3e6901d (Plotly switch from mapbox to maplibre) +======= self, map_style: str = "carto-positron", **kwargs: Any +>>>>>>> 339371b (swith mapbox to map) ) -> "go.Figure": raise ImportError("Install plotly or traffic with the plotly extension")