%% Create Data Tip Between Data Points
% Plot data and return the Line object. Show a marker at each plotted data point. Then, create a data tip between two data points by specifying the x- and y-coordinates for the data tip and specifying the SnapToDataVertex name-value pair argument as 'off'.

x = linspace(1,10,10);
y = 2.*x;
p = plot(x,y,'-*');

dt = datatip(p,3.5,7,'SnapToDataVertex','off');

% Copyright 2019 The MathWorks, Inc.