フィルターのクリア

How to Use "Generate Maximally Perceptually Distinct Colors" Function?

19 ビュー (過去 30 日間)
árbol
árbol 2018 年 1 月 24 日
回答済み: Soumya Saxena 2018 年 2 月 2 日
I would like to implement Tim Holy's "Generate Maximally Perceptually Distinct Colors" function in my code. I have attempted the following:
colors = distinguishable_colors(100);
plot(t,A(:,j),colors(j,:)); % j is a counter that was defined earlier in the code
xlabel('Time (in days)');
ylabel('Bee Population');
h_xlabel = get(gca,'XLabel');
set(h_xlabel,'FontSize',14);
h_ylabel = get(gca,'YLabel');
set(h_ylabel,'FontSize',14);
set(gca,'fontName','Helvetica');
hold on
I modeled my attempt after the answer to the following question:
https://www.mathworks.com/matlabcentral/answers/105104-how-to-do-plotting-with-different-colors-in-same-figure.
My attempt results in the following error:
Error using plot
Data must be a single matrix Y or a list of pairs X,Y.
Error in AG_Solve_e3v1 (line 77)
plot(t,A(:,j),colors(j,:));
The distinguishable_colors function is posted here: https://www.mathworks.com/matlabcentral/fileexchange/29702-generate-maximally-perceptually-distinct-colors.
Thank you!

採用された回答

Soumya Saxena
Soumya Saxena 2018 年 2 月 2 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElectrical Block Libraries についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by