[Python] How to disable zoom in plotly choropleth mapbox plot with Python?

Discussão em 'Python' iniciado por Stack, Agosto 11, 2025.

  1. Stack

    Stack Membro Participativo

    Here is my code:

    fig = px.choropleth_mapbox(district_df[['District','Confirmed','Deaths','id','province']], geojson = geo_df, locations='id', color='Confirmed',
    color_continuous_scale="Viridis",
    mapbox_style="carto-positron",
    zoom=5.9, hover_name = 'District',hover_data = {'District':False, 'Confirmed':True,'Deaths':True,'province':False,'id':False},
    opacity=0.5, center = {"lat": 28.3949, "lon": 84.1240})


    I would like to disable the zooming option. Is there a way?

    Continue reading...

Compartilhe esta Página