How to plot multiple lines in predefined colors ?
30 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How to plot multiple lines with different predefined colors
CM = jet(2);
x= linspace(1,10,10);
y1 = x.^2; y2 =x.^3;
plot(x,y1,CM(1,:),x, y2, CM(2:)) %what is the correct entry here for the color CM(1,:)
0 Commenti
Risposte (1)
Arthur Roué
il 6 Ago 2020
CM = jet(2);
x = linspace(1,10,10);
y1 = x.^2; y2 =x.^3;
plot(x, y1, 'Color', CM(1,:)); hold on
plot(x, y2, 'Color', CM(2,:));
0 Commenti
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!