title: matplotlib add solid color legend key for item which has different colors
body: <p>I find matplotlib to be one of the mot confusing libraries to figure out :(</p>
  <p>I am using the scatter function of an axis to plot some points, and each point has its own weight associated with it that controls the opacity...</p>
  <pre><code>colors = [(*c[:3], w.item() / 1) for w in weight]
  ax.scatter(gen, samples, c=colors, s=10, marker=&quot;*&quot;, label=&quot;$\\tilde{x}$&quot;, zorder=-100)
  ax.legend
  </code></pre>
  <p>The problem is that the color in the legend appears to be a random color from the <code>colors</code> array. Sometimes it is translucent because some of the colors in the scatter are nearly translucent. I would like the color in the legend to be solid, while keeping the variable colors in the scatterplot.</p>
  <p>How would I accomplish this?</p>