how I can insert these specific colours into my figures

2 ビュー (過去 30 日間)
Matthew Worker
Matthew Worker 2021 年 6 月 9 日
編集済み: Rena Berman 2021 年 12 月 16 日
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)
  1 件のコメント
Rena Berman
Rena Berman 2021 年 12 月 16 日

(Answers Dev) Restored edit

サインインしてコメントする。

採用された回答

Alan Stevens
Alan Stevens 2021 年 6 月 9 日
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 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by