Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

How to replace markers with words in Scatter plot?


Is there a way to replace markers with words on a graph ?

My current function call is as the following:

trace = go.Scatter(
                x = xtsne[:,0],
                y = xtsne[:,1],
                marker = dict(
                size = 5,
                color = 'rgb(255, 0, 0)',
                line = dict(
                    width = 2,
                mode= 'markers',
                text = labels

Thank you.

Hi there,
You can use mode='text'
See an example here:

1 Like