`fitbounds="locations"` parameter not working for `px.choropleth_map`
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 18.8k
- Fork
- 2.8k
- Merge medio
- 16h 26m
- PR unite (30g)
- 21
Descrizione
The fitbounds parameter appear not to work when used in choropleth mapbox. The only way I found to pass it to the Figure object was to use the update_geos method.
The following is a sample of the code to show the parameter used:
fig = px.choropleth_mapbox(
df,
geojson=self.geojson,
featureidkey=self.featureidkey,
locations="location_code,
color=self.metric,
mapbox_style="carto-positron",
opacity=0.4
)
fig.update_geos(fitbounds="locations")
When calling fig.show, the plot opens to the (0,0) location in Gulf of Guinea.
Why the fitbounds parameter doesn't work on choropleth mapbox?
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo l’esempio px.choropleth_mapbox fornito e verifica come viene gestito fitbounds da choropleth_mapbox rispetto a update_geos. Traccia il punto di ingresso della generazione della figura e conferma che la mappa sia centrata sulle posizioni fornite invece che su (0,0); documenta un controllo di regressione mirato per questo comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 58/100