I'm plotting several things at once and would like to be able to add a data tip row in order to identify the different lines I have running across the plot. Here's my code (I replaced my variables with 'yes' and 'yeehaw'):
for k = 1:length(objects)
index = objects(k);
p = plot3(yes(index).yeehaw(:,1),yes(index).yeehaw(:,2),...
str = yes(index).Name;
fh = str2func(str);
row = dataTipTextRow('yes or yeehaw',fh);
p.DataTipTemplate.DataTipRows(end+1) = row;
And then there are some modifiers for my plot and stuff before the loop closes. I keep getting the following error:
Error using matlab.graphics.datatip.DataTipTemplate/set.DataTipRows. Value must be a string scalar or a character vector with the name of a data property, such as 'XData', or it must be a vector or a function handle.
What can I do?