(Answers Dev) Restored edit
how I can insert these specific colours into my figures
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Matthew Worker
le 9 Juin 2021
Modifié(e) : Rena Berman
le 16 Déc 2021
newcolors = [0 0.4470 0.7410
0.8500 0.3250 0.0980
0.9290 0.6940 0.1250
0.25 0.80 0.54
1 0.4470 0.7410
1 0.6940 0.7410
0.4940 0.2840 0.5560
0.7 0.6 0.6
0.3010 0.7450 0.9330
0.7350 0.0780 0.1840];
colororder(newcolors)
figure(1)
legendString = "N = " + string(N);
plot_T = plot(K,C_T,'-O','LineWidth',2);
grid on
title('Total Capacity of the System')
xlabel('Number of Users')
ylabel('Total Capacity (bit/s/Hz)')
legend(plot_T,legendString)
figure(2)
legendString = "K = " + string(K);
plot_L = plot(N,C_T,'-O','LineWidth',2);
grid on
title('Total Capacity of the System')
xlabel('Number of Elements')
ylabel('Total Capacity (bit/s/Hz)')
legend(plot_L,legendString)
Réponse acceptée
Alan Stevens
le 9 Juin 2021
Do you mean something like this?
newcolors = [0 0.4470 0.7410;
0.8500 0.3250 0.0980;
0.9290 0.6940 0.1250;
0.25 0.80 0.54;
1 0.4470 0.7410;
1 0.6940 0.7410;
0.4940 0.2840 0.5560;
0.7 0.6 0.6;
0.3010 0.7450 0.9330;
0.7350 0.0780 0.1840];
x = 0:pi/50:2*pi;
[r,c] = size(newcolors);
for i=1:r
y = i*sin(i*x);
plot(x,y,'color', newcolors(i,:));
hold on
end
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox 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!
