MAKEDATATIP allows programmatically adding datatips to graphical objects.
Creation of this function was motivated because I was unable to find any simple built-in method. If there is a better method, I would love to know about it.
Note that this function was only tested in R2007b.
Example:
x = 1:10;
y = rand(1,10);
hPlot = plot(x,y);
makedatatip(hPlot,[3 8])
Example:
[X,Y,Z] = peaks(30);
hObj = surf(X,Y,Z);
I = [5 8; 20 12; 22 28];
hDatatip = makedatatip(hObj, I); |