get title of subplot back
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Max Müller
le 8 Août 2014
Commenté : Max Müller
le 8 Août 2014
hey Guys, I have 9subplots in 1 figure and I want to give the User of my program the possibility to click of one subplot and get the title back....
do u have any tips ?
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 8 Août 2014
close
x=repmat((1:10)',1,9);
y=rand(10,9);
for k=1:9
subplot(3,3,k);
plot(x(:,k),y(:,k));
title(sprintf('title%d',k))
end
%------The code-----------------------
h=flipud(findobj(gcf,'type','axes'))
%-----get title N°5----------------
n=5
g=get(h(n),'title');
title_5=get(g,'string')
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Subplots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!