An excerpt from "Truth or Truthiness" by Howard Wainer:
"In 1973 Jacques Bertin, the acknowledged master theorist of modern
graphics explained that when one produces a graph, it is best to label each
of the elements in the graph directly. He proposed this as the preferred
alternative to appending some sort of legend that defines each element.
His point was that when the two are connected, you could comprehend
the graph in a single moment of perception, as opposed to having to first
look at the lines, then read the legend, and then match the legend to
the lines. This advice is too rarely followed."
- https://rud.is/b/2015/08/27/coloring-and-drawing-outside-the-lines-in-ggplot/
- https://depictdatastudio.com/directly-labeling-line-graphs/
We should extend the logic in the legend to allow both variants - labels with curve name in the box (this is what we have now) and labels "attached" to the curves with the possibility to specify the position.