colorSpectrum: Create N Distinct Plot Colors

版本 1.2.0.0 (1.4 KB) 作者: Kirk
Creates N distinct three-element RPB vectors for plotting
573.0 次下载
更新时间 2013/12/4

查看许可证

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

引用格式

Kirk (2024). colorSpectrum: Create N Distinct Plot Colors (https://www.mathworks.com/matlabcentral/fileexchange/44589-colorspectrum-create-n-distinct-plot-colors), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2013a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Colormaps 的更多信息
致谢

启发作品: Maximally Distinct Color Generator

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.2.0.0

Made some corrections in comments and description.

1.1.0.0

Fixed small typo