Displaying scatter labels by default?

Hi everyone,

I’m using dash to create an interactive scatter plot and I was wondering if anyone know hows one can display the text label accompanying each point in a go.Scatter by default? I went through the documentation but I could only find ways to do it on hover but perhaps I missed something. Many thanks in advance!

Try mode='markers+text'

1 Like

Thanks Will, that was exactly what I wanted. The only thing is now the text is displayed right on top of each point. Is there an attribute to float it below each point?

No worries. Google is your friend :slight_smile: That’s how I found out. Add textposition='bottom'

Ah yes, I now see it’s in the plotly documentation as well. Completely missed it. Thanks again!

1 Like