# Hide Colormap on Choropleth Map in Python

**URL:** <https://community.plotly.com/t/hide-colormap-on-choropleth-map-in-python/2746>\
**Category:** 📊 Plotly Python\
**Created:** [November 22, 2016, 3:40pm UTC](https://community.plotly.com/t/hide-colormap-on-choropleth-map-in-python/2746 "2016-11-22T15:40:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abbyinohio](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@abbyinohio](https://community.plotly.com/u/abbyinohio)\
**Post date:** [November 22, 2016, 3:40pm UTC](https://community.plotly.com/t/hide-colormap-on-choropleth-map-in-python/2746/1 "2016-11-22T15:40:55Z")

</div>

How can I hide a colormap next to a Choropleth map in Python? I’ve found mentions of “hidescale” and “hidelegend”, but I don’t know where to insert them in my code! Thank you.

```
ufo_scale = [[0, 'rgb(255, 255, 255)'],[1, 'rgb(0, 204, 102)']]

data = [ dict(
        type='choropleth',
        colorscale = ufo_scale,
        autocolorscale = False,
        locations = us_states,
        z = ufo_count,
        locationmode = 'USA-states',
        marker = dict(
            line = dict (
                color = 'rgb(255, 255, 255)',
                width = 2
            ) ),
        ) ]

layout = dict(
        title = 'UFO Sightings Reported in United States (1900-2014)',
        geo = dict(
            scope='usa',
            projection=dict( type='albers usa' ),
            showlakes = True,
            lakecolor = 'rgb(255, 255, 255)'),
             )

figure = dict( data=data, layout=layout )
iplot(figure)
```

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [November 22, 2016, 4:20pm UTC](https://community.plotly.com/t/hide-colormap-on-choropleth-map-in-python/2746/2 "2016-11-22T16:20:39Z")

</div>

`showscale = True` should do the trick.

---

<div class="post-metadata">

**Author:** ![hobs](https://avatars.discourse-cdn.com/v4/letter/h/848f3c/32.png) [@hobs](https://community.plotly.com/u/hobs)\
**Post date:** [March 10, 2017, 10:11pm UTC](https://community.plotly.com/t/hide-colormap-on-choropleth-map-in-python/2746/4 "2017-03-10T22:11:49Z")

</div>

Sometimes the `showscale=False` configuration fails, due to a plotly bug, but this hack from another plotly forum answer fixed it for me: [Hiding Color Scale / Color Legend](https://community.plotly.com/t/hiding-color-scale-color-legend/1223/6?u=hobs)
