# Issue: px.scatter\_geo opacity changes markers opacity and legend items opacity. Is there a way to change one but not the other?

**URL:** <https://community.plotly.com/t/issue-px-scatter-geo-opacity-changes-markers-opacity-and-legend-items-opacity-is-there-a-way-to-change-one-but-not-the-other/76120>\
**Category:** Dash Python\
**Created:** [June 15, 2023, 9:55am UTC](https://community.plotly.com/t/issue-px-scatter-geo-opacity-changes-markers-opacity-and-legend-items-opacity-is-there-a-way-to-change-one-but-not-the-other/76120 "2023-06-15T09:55:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David22](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@David22](https://community.plotly.com/u/David22)\
**Post date:** [June 15, 2023, 9:55am UTC](https://community.plotly.com/t/issue-px-scatter-geo-opacity-changes-markers-opacity-and-legend-items-opacity-is-there-a-way-to-change-one-but-not-the-other/76120/1 "2023-06-15T09:55:56Z")

</div>

By reading the doc regarding the scatter mode, it suggests to use the “opacity” to display a shade of colour when several points are at the same location

> **[Layout](https://plotly.com/python/reference/layout/#layout-scattermode)**
>
> Figure

The doc of px.scatter\_geo states that opacity changes the markers opacity:  
[https://plotly.com/python-api-reference/generated/plotly.express.scatter\_geo](https://plotly.com/python-api-reference/generated/plotly.express.scatter_geo)

However, since it changes the opacity of both the legend item and the markers on the map, light colors become almost all equal:

Opacity=0.2:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/f/8/f883a87567df9d6b2d136155b7646919056da8fe.png)

Legend item should be “Purple, Green, Red, Lila, Blue, Sand” At 0.2 opacity, they are almost all grey.

Is there any way to trick this, other than CSS? Adding new shapes? Hiding the original legend items and adding traces without coordinates, but opacity set on 1 ?
