The Annotation "Anchor to Data" action when pointing breaks smallest number of changes rule. Any action should minimize the number of changes in the visible state, so the annotation should not move though it is now bound to the data.
Compare:
add annotation
anchor to data. Note the annotation does not move
move the axes to verify it is attached.
To:
add annotation to 0 to 100, 0 to 100 plot.
point at 50,50.
anchor to data. Note the annotation DOES move to somewhat arbitrary location
It is acting like the anchor is the pointAtX,pointAtY point, not the xrange and yrange. This is a problem with documentation, and I don't think this has ever been precisely described. So I think this is a problem where the specification of the DasAnnotation object needs to be made more precise, first.
Autoplot will be corrected by making the xrange and yrange be the same as the point, and then setting the emOffset to achieve the old location.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looking over a couple of changes where I document the behavior, it seems clear that it was intended that the xrange, yrange box was intended to be the location for the annotation. This is also demonstrated by the strange behavior when "pointAt" was changed, because the annotation itself would move. This logic, deemed incorrect, has been in place for many years, but I think it is more describable, stable, and consistent with other anchorTypes to do it this way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's still a small jump with each operation, and maybe the "point at" logic should be to set the xrange and yrange to include the annotation itself, so that there is not a large em offset.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is acting like the anchor is the pointAtX,pointAtY point, not the xrange and yrange. This is a problem with documentation, and I don't think this has ever been precisely described. So I think this is a problem where the specification of the DasAnnotation object needs to be made more precise, first.
Autoplot will be corrected by making the xrange and yrange be the same as the point, and then setting the emOffset to achieve the old location.
Looking over a couple of changes where I document the behavior, it seems clear that it was intended that the xrange, yrange box was intended to be the location for the annotation. This is also demonstrated by the strange behavior when "pointAt" was changed, because the annotation itself would move. This logic, deemed incorrect, has been in place for many years, but I think it is more describable, stable, and consistent with other anchorTypes to do it this way.
There's still a small jump with each operation, and maybe the "point at" logic should be to set the xrange and yrange to include the annotation itself, so that there is not a large em offset.
See also https://sourceforge.net/p/autoplot/bugs/2572/