Legend positioning , support for axis domain

Hello!

Lately I’ve been playing with the (recent?) support for an arbitrary number of legends. This is a great feature when dealing with complex figures with different subplots. However, I find it very limiting to only be able to have as a reference for their positioning paper and container, for my use case, being able to use an specific axis domain as reference would greatly simplify its positioning and make the code much cleaner. Here is an example, see the highlighted legend that is trying to emulate an individual plot legend:

The positioning is not quite right (also ignore the positioning of the other two global legends I was just playing around), but it’s quite cumbersome to align the text horizontally so it ends at the end of the plot box. For the y position I am using the domain of the specific plot that I was already setting manually.

Is this already supported and I am missing something? If not would it be feasible to add support for it? Maybe with the current approach is already possible to set some anchor for the text?

PD.: I think there is a bug the in the log when setting the legends layouts, it says legends should be named: legend, legend1, legend2, etc, but in my experience “legend” and “legend1” are the same, so it should be legend, legend2, legend3, etc

(Also, It would be great if the names could be arbitrary, like legend_something)

Thanks!