Custom Colors for Plots

版本 1.0.0.0 (1.9 KB) 作者: Andres
This function provides a selection of colors easy to differentiate for plotting graphics.
598.0 次下载
更新时间 2012/5/3

查看许可证

In plot graphs, often it's needed to use a several colors that can be easily differentiated on a first look on the graphic. With this function you can call easily (by name or by code) a selection of 15 colors.
It's very simple and there are more elegant ways to do it, but I think it's a very functional solution.

Examples:
for ccc=1:15
plot(ccc*ones(1,10),'Linewidth',4,'Color', CustomColors(ccc))
end

plot(ones(1,10),'Linewidth',4,'Color', CustomColors('Coral'))
plot(ones(1,10),'Linewidth',4,'Color', CustomColors('DeepSkyBlue4'))

引用格式

Andres (2024). Custom Colors for Plots (https://www.mathworks.com/matlabcentral/fileexchange/36514-custom-colors-for-plots), MATLAB Central File Exchange. 检索时间: .

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

启发作品: Maximally Distinct Color Generator

Community Treasure Hunt

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

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