I think that you may be running into a bug with the xy graph. I have
not been able to isolate the problem. There is a solution however. I
found that if you set the cursor to be free and not snap to point,
your code works fine. (right click on the graph >> visible items >>
cursor legend. Click
Yes, I have tride both many times. I actually get the same result on
a machine with an evaluation license installed! You have to look very
closely to see that the cursor is not in the correct location. Run
the program and then zoom in. It will be close, but not exact. Keep
that zoom and then r