Black Lives Matter. Please consider donating to Black Girls Code today.

Modifying Data in Legend

I’m using a bubble graph and I need to be able to have my legend to basically be similar to this:

(Color Blue) 0-.24
(Color Green) .25 - .49
(Color Red) .50-.74
(Color Orange) .75-1

It keeps giving me every single number on the legend. Is there any way to arrange this so that it groups it together? I’ve tried using group by but it doesn’t seem to work.

Traces map one-to-one to legend items by default.

Try setting showlegend to false in each of the traces the you don’t want to show up in the legend.