How to give glow to scatter plot?

So i wanna give neon glowing effect to markers of scatter plot ,
as show in the below reference image, is it possible in plotly?
image

This is not currently available in Plotly to my knowledge.

Actually nevermind, I just discovered the gradient attribute on Scatter traces markers. This allows you to do the following workaround with 2 traces, one with gradient markers to 0 opacity and one without.

This wouldn’t work with scattergl nor scatter3d though.

image

go.Figure(
    data=[
        go.Scatter(
            x=[1,2,3],
            y=[4,8,5],
            mode="markers",
            marker=dict(
                color=["rgba(255,0,0,0)", "rgba(255,0,255,0)", "rgba(0,0,255,0)"],
                size=40,
                gradient=dict(
                    color=["rgba(255,0,0,1)", "rgba(255,0,255,1)", "rgba(0,0,255,1)"],
                    type="radial",
                )
            ),
            name="Glowing",
            legendgroup="0",
        ),
        go.Scatter(
            x=[1,2,3],
            y=[4,8,5],
            mode="markers",
            marker=dict(
                color=["rgba(255,0,0,1)", "rgba(255,0,255,1)", "rgba(0,0,255,1)"],
                size=24,
            ),
            showlegend=False,
            legendgroup="0",
        ),
    ],
    layout=dict(
        width=600,
        height=450,
    )
)
6 Likes

Thanks a lot buddy :heart:

I’ve created an account to thank you for this.
Thank you.

2 Likes

Welcome to the community @Liarra . We hope you learn a lot about Plotly and Dash in the Forum.