[datacursermode] Counter for data tips in a figure
Mostrar comentarios más antiguos
Hello everybody
I would like to have some kind of counter in my figure, that displays the number of data tips in my figure in real time. If I add a data tip the counter has to raise and if I delete a data tip the counter should decline.
Thanks in advance
Respuestas (2)
Fritz
el 31 de Oct. de 2014
Sean de Wolski
el 31 de Oct. de 2014
In R2014b, you can look for found parts of the axes that are PointDataTips
fig = figure;
ax = gca;
plot(rand(1,10))
% add some data tips
ntip = 0;
h = findall(ax);
for ii = 1:numel(h)
ntip = ntip+isa(h(ii),'matlab.graphics.shape.internal.PointDataTip');
end
disp(ntip)
There's probably a similar thing you can search for in releases before 14b.
Categorías
Más información sobre Environment and Settings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!