Description
So with the new add_hline
-style functions we're adding in #2558 it'll be really easy to add lines in various contexts. Now what about labelling those lines? Plotly.js doesn't currently have the ability to label shapes, and won't for a while, so users are stuck adding annotations. For a horizontal line, the user might want to add an annotation anchored to the left (right, middle) of the plot, above (below) the line, so 6 possible positions, say. For a rect the same would be true for the top and bottom of the rect (for 12 possible positions, say). How can we make this easier for users?
Should we add add_hline_annotation()
which would accept annotation
kwargs plus an extra relative_position
arg that would be line "above middle"
or something? Or should we shoehorn in a couple of extra kwargs in add_hline()
itself like annotation=dict(...), annotation_position="above middle"
?
@nicholas-esterer @alexcjohnson @emmanuelle @jonmmease thoughts?