From 57fafb198447101ad9ac25db8b77d8ecfa541e1f Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 16 Jun 2025 09:05:10 +0200 Subject: [PATCH] Update generate_map.py --- .github/generate_map.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/generate_map.py b/.github/generate_map.py index aa7988e93..50ebba9ba 100644 --- a/.github/generate_map.py +++ b/.github/generate_map.py @@ -93,7 +93,6 @@ def username_to_country(login): def build_choropleth(percent_by_iso): - # build dataframe-like structure for plotly iso, vals = zip(*percent_by_iso.items()) fig = px.choropleth( locations=list(iso), @@ -105,10 +104,13 @@ def build_choropleth(percent_by_iso): fig.update_layout( coloraxis_colorbar=dict( title="% stargazers", - len=0.5, + orientation="h", # <-- échelle horizontale + x=0.5, # <-- centré + y=0, # <-- tout en bas + xanchor="center", + yanchor="bottom", thickness=15, - x=0.95, - y=0.5, + len=0.7, # <-- longueur de l'échelle, ajustable ), margin=dict(l=0, r=0, t=0, b=0), )