For a more compact legend, I want to omit the trace symbol and show only the name of trace, where the text color of the name is the same as the trace color. How can I do this?
Here is an illustration of my wish:

taken from an answer for gnuplot and where I erased the legend symbols by hand.
I tried with css
.legendtext + g {
display: none;
}
But the space is still occupied (since it is svg not html).