# Is there any way to add markers to Scatter plot only when the zoom level shows small number of data and hide it otherwise?

**URL:** <https://community.plotly.com/t/is-there-any-way-to-add-markers-to-scatter-plot-only-when-the-zoom-level-shows-small-number-of-data-and-hide-it-otherwise/63033>\
**Category:** 📊 Plotly Python\
**Created:** [April 14, 2022, 2:16am UTC](https://community.plotly.com/t/is-there-any-way-to-add-markers-to-scatter-plot-only-when-the-zoom-level-shows-small-number-of-data-and-hide-it-otherwise/63033 "2022-04-14T02:16:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![python-trader](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/python-trader/32/18861_2.png) [@python-trader](https://community.plotly.com/u/python-trader)\
**Post date:** [April 14, 2022, 2:16am UTC](https://community.plotly.com/t/is-there-any-way-to-add-markers-to-scatter-plot-only-when-the-zoom-level-shows-small-number-of-data-and-hide-it-otherwise/63033/1 "2022-04-14T02:16:15Z")

</div>

Greetings,

When I add the following code to my Scatter chart, it shows both line and markers on my Scatter chart. It works well.

> fig.update\_traces(  
> hoverinfo=“name+x+text”,  
> line={“width”: 0.5},  
> marker={“size”: 8},  
> mode=“lines+markers”,  
> showlegend=False  
> )

When the size of my data increases, above code makes the chart page irresponsive. Plotly cannot add markers to an scatter when the size of data is beyond ~100,000 or more.

Is there any way to add markers to Scatter plot only when the zoom level shows small number of data and hide it otherwise?

Thank you,

---

<div class="post-metadata">

**Author:** ![Precog](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Precog](https://community.plotly.com/u/Precog)\
**Post date:** [May 20, 2022, 12:17am UTC](https://community.plotly.com/t/is-there-any-way-to-add-markers-to-scatter-plot-only-when-the-zoom-level-shows-small-number-of-data-and-hide-it-otherwise/63033/2 "2022-05-20T00:17:34Z")

</div>

I’d like to know if this is possible too?
