MATLAB Answers

how I can insert these specific colours into my figures

5 views (last 30 days)
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)

Accepted Answer

Alan Stevens
Alan Stevens on 9 Jun 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

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!