yanchor

Sets the legend's vertical position anchor. This anchor binds the y position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for y values less than or equal to 1/3, anchors legends to at their top for y values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.