Plot graph 'shape' and 'annotation' coordinates do not align

Hi guys.

My understanding is that, when creating custom shapes and annotations, setting the xref and yref options to ‘paper’ sets shape and annotation position coordinates relative to the graph canvas. For example in the x domain a value of 0 is the furthest most left point of the graph and a value of 1 is the furthest most right.
What confuses me is that it looks to me like the graph scope for anotations and shapes is different: the shapes canvas is inclusive of the area encompassing axis labels and ticks while annotations does not which means I cannot easily align a shape and annotation using the same coordinates.

Perhaps I am misunderstanding something about how shapes and annotations should be used?
Could someone clarify my understanding and offer a solution to aligning shapes and annotations?

Thanks!
Harry

Hey @harryj welcome to the forums.

Good examples by @empet:

Thanks @empet that’s really helpful!

Can you explain why these don’t align for annotations and shapes then? Should they be using the same domains or is this a bug?

@empet Can you confirm if this is a bug or intended?

Could you provide an example?