how to produce multtiple stacked plots with different colors in a for loop?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Zeynab Mousavikhamene
il 25 Ott 2019
Modificato: Zeynab Mousavikhamene
il 25 Ott 2019
I am producing multiple plots in a for loop in one axis. Any idea to produce different colors for each plot? It will be ~60 plots stacked on each other.
Beacuse plots are stacked in a for loop I cant give individual color as usual.
Risposta accettata
Daniel M
il 25 Ott 2019
t = 0:0.001:1;
figure
col = jet(60);
for k = 1:60
x = sin(2*pi*5*t + k/60);
plot(t,x,'-','Color',col(k,:));
hold on
end
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Orange in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!