This feature has been added in MATLAB 7.3 (R2006b). It is possible to bring up a callback editor from the data cursor context-menu which allows interactive editing of the data cursor text. You can use the last two items in the Data Cursor context menu, 'Edit Text Update Function' and 'Select Text Update Function,' for this purpose. For previous releases, please read below for workarounds.
To work around this issue, get the handle to the "datatip" and change its 'String' property, as the steps below illustrate:
plot(1:10)
m = findall(gcf,'Type','hggroup')
set(m,'String', 'My String')
The example code above assumes that the "datatip" is the only "hggroup" object present in the figure. If there are more objects of Type "hggroup", then the example will have to be modified to get the handle of the specific "datatip" that you want to edit.
Best Answer