# Can't drop the white background for this chloropleth map

**URL:** <https://community.plotly.com/t/cant-drop-the-white-background-for-this-chloropleth-map/37610>\
**Category:** 📊 Plotly Python\
**Created:** [April 11, 2020, 6:01am UTC](https://community.plotly.com/t/cant-drop-the-white-background-for-this-chloropleth-map/37610 "2020-04-11T06:01:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PropeReferio](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@PropeReferio](https://community.plotly.com/u/PropeReferio)\
**Post date:** [April 11, 2020, 6:01am UTC](https://community.plotly.com/t/cant-drop-the-white-background-for-this-chloropleth-map/37610/1 "2020-04-11T06:01:29Z")

</div>

The page as a whole has a black background… and the white one on the states is an eyesore.

Any idea how to change it to black, too?

[https://covid-dash-bo.herokuapp.com/](https://covid-dash-bo.herokuapp.com/)

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [April 11, 2020, 2:22pm UTC](https://community.plotly.com/t/cant-drop-the-white-background-for-this-chloropleth-map/37610/2 "2020-04-11T14:22:03Z")

</div>

Hi @PropeReferio you can use the `bgcolor` property of the `go.layout.Geo` axis, and you’ll also need to set the `paper_bgcolor` so that margins are also black.  
For example

```auto
import plotly.graph_objects as go

fig = go.Figure(go.Scattergeo())
fig.update_geos(
    visible=False, resolution=110, scope="usa",
    showcountries=True, countrycolor="white",
    showsubunits=True, subunitcolor="Blue",
    showocean=True, oceancolor='black',
    bgcolor='black'
)
fig.update_layout(height=300, margin={"r":0,"t":0,"l":0,"b":0},
                 paper_bgcolor='black'
                 )
fig.show()

```

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/1/1ceb5192502874a44801a73f8c48452efe8dde77.png)

---

<div class="post-metadata">

**Author:** ![PropeReferio](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@PropeReferio](https://community.plotly.com/u/PropeReferio)\
**Post date:** [April 11, 2020, 3:18pm UTC](https://community.plotly.com/t/cant-drop-the-white-background-for-this-chloropleth-map/37610/3 "2020-04-11T15:18:37Z")

</div>

You’re the best, thank you \<3

---

<div class="post-metadata">

**Author:** ![PropeReferio](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@PropeReferio](https://community.plotly.com/u/PropeReferio)\
**Post date:** [April 11, 2020, 3:55pm UTC](https://community.plotly.com/t/cant-drop-the-white-background-for-this-chloropleth-map/37610/4 "2020-04-11T15:55:39Z")

</div>

> [@Emmanuelle](#):
>
> fig.update\_geos( visible=False, resolution=110, scope=“usa”, showcountries=True, countrycolor=“white”, showsubunits=True, subunitcolor=“Blue”, showocean=True, oceancolor=‘black’, bgcolor=‘black’ )

Any idea how to disable zoom on the map?

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [April 11, 2020, 8:25pm UTC](https://community.plotly.com/t/cant-drop-the-white-background-for-this-chloropleth-map/37610/5 "2020-04-11T20:25:28Z")

</div>

You can disable the scroll zoom with a config option

```auto
import plotly.graph_objects as go

fig = go.Figure(go.Scattergeo())
fig.update_geos(
    visible=False, resolution=110, scope="usa",
    showcountries=True, countrycolor="white",
    showsubunits=True, subunitcolor="Blue",
    showocean=True, oceancolor='black',
    bgcolor='black'
)
fig.update_layout(height=300, margin={"r":0,"t":0,"l":0,"b":0},
                 paper_bgcolor='black'
                 )
fig.show(config = dict({'scrollZoom': False}))

```

and if you want to remove zool alltogether you can remove the corresponding modebar buttons as described in [https://plotly.com/python/configuration-options/#removing-modebar-buttons](https://plotly.com/python/configuration-options/#removing-modebar-buttons)
