This is related to this question in the community forum. Opened an issue since I think this is a better place for a feature request.
In short, enabling arbitrary axis as a reference system for legends would greatly simplify its positioning along different axis in order to achieve a legend per plot in a figure with subplots. Currently is only supported for shapes, annotations, and images:
Furthermore, shapes, annotations, and images can be placed relative to an axis's domain so that, for instance, an x value of 0.5 would place the object halfway along the x-axis, regardless of the domain as specified in the layout.xaxis.domain attribute. This behavior can be specified by adding ' domain' to the axis reference in the axis referencing attribute of the object. For example, setting yref = 'y2 domain' for a shape will refer to the length and position of the axis named y2.
This is related to this question in the community forum. Opened an issue since I think this is a better place for a feature request.
In short, enabling arbitrary axis as a reference system for legends would greatly simplify its positioning along different axis in order to achieve a legend per plot in a figure with subplots. Currently is only supported for shapes, annotations, and images: