I’m new to plotly and I like that library. I cannot place the legend above or under my plot so that all looks fine.
I have e.g. 15 traces in my plot with 2 y-axes and I had configure a range slider.
My goal is to place the legend above or under the plot. The plot and the range-slider should be align each other.
It tries many combinations of x,y, xanchor, anchor but don’t achieve my goal.
I created a jsFiddle example for that: https://jsfiddle.net/3trr91m0/2/
xanchor (enumerated: “auto” | “left” | “center” | “right” )
Sets the legend’s horizontal position anchor. This anchor binds the
x position to the “left”, “center” or “right” of the legend.
yanchor (enumerated: “auto” | “top” | “middle” | “bottom” )
Sets the legend’s vertical position anchor This anchor binds the
y position to the “top”, “middle” or “bottom” of the legend.
x (number between or equal to -2 and 3)
Sets the x position (in normalized coordinates) of the legend.
y (number between or equal to -2 and 3)
Sets the y position (in normalized coordinates) of the legend.
I not really understand xanchor and yanchor: It binds the x position on e.g. “top” of the legend. Why of the legend? I don’t understand that…
Maybe anbody can help me so that my example looks fine.