Matlab tricks---plot color
程序员文章站
2023-12-30 16:03:58
...
The default color of MATLAB is not ugly but sometimes not convenient. I found an easy way to plot beautiful lines [1].
You just need to generate distinguishiable colors by ‘‘C = linspecer(N)’’.
`` C’’ contains the RGB values of these colors by rows.
Then you can even use the inherit function of MATLAB [3] to set color oder and line order, which is fantastic. Here is an simple example
x = linspace(0,7);
y = ones(length(x),9);
for i = 1:9
y(:,i) = sin(x-i/5)';
end
plot(x,y)
C = linspecer(3); %% generate 3 colors
ax = gca;
ax.ColorOrder = C;
ax.LineStyleOrder = {'-','--',':'};
推荐阅读
-
Matlab tricks---plot color
-
Matlab tricks--array response vector
-
Matlab备忘录模式
-
谈谈从经纬度坐标到欧式距离的转化【matlab实现】
-
Matlab R2019b Mac版安装许可激活图文教程(含许可文件+密钥)
-
在 Illustrator 中使用“Adobe Color 主题”面板创建颜色主题
-
MATLAB和Python 相互无法替代的地方有哪些,对于以后一直做科研的人,两种语言到底哪家强?
-
matlab cubic spline interpolation 三次样条插值
-
三次样条插值的Matlab
-
matlab纹理映射之地球