title: plotly: hide legend symbols and change legend name colors
body: <p>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?</p>
  <p>Here is an illustration of my wish:
  <img src="https://i.stack.imgur.com/hpSIv.png" alt="" /></p>
  <p>taken from an <a href="https://stackoverflow.com/a/67747322/11769765">answer for gnuplot</a> and where I erased the legend symbols by hand.</p>
  <p>I tried with css</p>
  <pre class="lang-css prettyprint-override"><code>.legendtext + g {
    display: none;
  }
  </code></pre>
  <p>But the space is still occupied (since it is svg not html).</p>