[datacursermode] Counter for data tips in a figure
Mostra commenti meno recenti
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
Risposte (2)
Fritz
il 31 Ott 2014
Sean de Wolski
il 31 Ott 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.
Categorie
Scopri di più su Environment and Settings in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!