Plot multiple graphs on the figure using plot(y,linespec)
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
figure();
plot(y_vec_1,'*-r');gz;
xlabel('Wrap Around #'); ylabel('Time (Sec)');
How can I plot a second graph on the same figure? Also y_vec_x's dimension varies a bit.
plot(y_vec_2,'*-b');gz;
plot(y_vec_3,'*-g');gz;
Thanks
0 commentaires
Réponse acceptée
Voss
le 4 Sep 2024
Use hold on
y_vec_1 = rand(1,10);
y_vec_2 = rand(1,15);
y_vec_3 = rand(1,20);
figure();
plot(y_vec_1,'*-r');%gz;
hold on
xlabel('Wrap Around #'); ylabel('Time (Sec)');
plot(y_vec_2,'*-b');%gz;
plot(y_vec_3,'*-g');%gz;
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations 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!
