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

9 views (last 30 days)
árbol on 24 Jan 2018
Answered: Soumya Saxena on 2 Feb 2018
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');
h_ylabel = get(gca,'YLabel');
hold on
I modeled my attempt after the answer to the following question:
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)
The distinguishable_colors function is posted here:
Thank you!

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by