Hi!
I’m using Plotly to generate a map with a lines in three different colours:

I’d like to be able to use the legend to toggle each of the groups on and off, but when I add a legend, it shows all the individual traces, so I’d have to click dozens of times to achieve the desired effect.
Is there a way to group these traces so that the legend will just show (e.g.) “blue”, “green”, and “orange”, so that I can toggle them all at once?
Also, a separate question: is it possible to specify different size nodes (markers) at each end of an edge (line)? So far I have only been able to set one size.
Thanks in advance!