Put title for each subplot
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ting-Yu Chueh
le 18 Sep 2019
Commenté : Star Strider
le 19 Sep 2019
Dear all,
I want to put a subtitle for each subplt. I tried to do, but it didn't work out.
The code is below, Could anyone help me to fix the code? Thanks!
Titileindex=["Group effect" "Condition effect" "Group by Condition"];
Titileindex=["Group effect" "Condition effect" "Group by Condition"];
figure;
for i= 1:3
subplot(3,1,i);
title ('Titleindex(i)');
end
0 commentaires
Réponse acceptée
Star Strider
le 18 Sep 2019
Remove the single quotes:
title (Titleindex(i));
and spell the name correctly in both the variable and references to it!
2 commentaires
Plus de réponses (0)
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!