allocating marker in for loop
Afficher commentaires plus anciens
I tried to allocate a marker to each plot in for loop but I could'nt. would you please help me with that?
I was able to give each plot a disired color but for marker the error shows up.
Many thanks
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 23 Août 2020
N = 15;
x = 1 : 20;
y = rand(20, N);
cmap = parula(N);
for K = 1 : N
plot(x, y(:,K), 'color', cmap(K,:), 'DisplayName', string(K));
hold on
end
hold off
legend show
Catégories
En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!