Legend for several matrix plots
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Amneh Alshawabka
le 3 Juin 2019
Modifié(e) : KALYAN ACHARJYA
le 4 Juin 2019
Hi there,
I'm trying to add a legend for my figure but the legend dose not match the matrix colour.
this is my code
figure
plot(Leftdata ,'K');hold on ;plot(Rightdata,'r'); % the size of Leftdata and the right data are 10coulumns and 101 rows for each.
grid on
grid minor
legend('Left','Right');

Any Suggestion to figure this problem out!!!!
Your help is greatly appreciated :)
Thanks
0 commentaires
Réponse acceptée
KALYAN ACHARJYA
le 3 Juin 2019
Modifié(e) : KALYAN ACHARJYA
le 4 Juin 2019
Its not a single lines, its bunch of lines
#Edited
p1=plot(Leftdata,'K');
hold on ;
p2=plot(Rightdata,'r');
grid on
grid minor
legend([p1(1),p2(2)],'left data','right data')
3 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Legend 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!