I plot graph and markers on it. However I see strange behavior - marker changes it\'s position while zooming. I\'ve created video about that (please switch to fullhd while w
It's because you set the y-axis labels
set(gca, 'YTickLabel', get(gca,'YTick'))
when you now start zooming, the ticks themselves change, but the labels don't. You notice this by zooming in and at the same time observing that the range of the y-axis does not change.
I think what you intended to do with the above yticklabel overruling is increase the accuracy of those ytick labels. But you forget to keep those labels up to date with the actual values.
This guy: http://undocumentedmatlab.com/blog/setting-axes-tick-labels-format/ has spent some time of making this an automatic process using callbacks.
On the file exchange the same person has a script to all automate it for you: http://www.mathworks.com/matlabcentral/fileexchange/36254-ticklabelformat
so you only have to call
ticklabelformat(gca,'y','%.6g')
or any other format you want