colorSpectrum: Create N Distinct Plot Colors

Version 1.2.0.0 (1,39 KB) von Kirk
Creates N distinct three-element RPB vectors for plotting
579 Downloads
Aktualisiert 4. Dez 2013

Lizenz anzeigen

For a consistent plot lines coloring scheme. Returns a color spectrum from red to green to blue. Avoids colors that are hard to see in matlab plots, such as yellow and cyan.

Three Easy Directions:
Obtain N curves or lines to plot: Data.
Type: C = colorSpectrum(N);
Plot: figure,hold on,for i = 1:N,plot(Data(i,:),'Color',C(i,:)),end,hold off

Zitieren als

Kirk (2026). colorSpectrum: Create N Distinct Plot Colors (https://de.mathworks.com/matlabcentral/fileexchange/44589-colorspectrum-create-n-distinct-plot-colors), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2013a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Color and Styling finden Sie in Help Center und MATLAB Answers
Quellenangaben

Inspiriert: Maximally Distinct Color Generator

Version Veröffentlicht Versionshinweise
1.2.0.0

Made some corrections in comments and description.

1.1.0.0

Fixed small typo