|||
1. 参考 http://www.thesis123.com/plotting-in-matlab/
dc=hsv(18); % 18 colours are generated
x = 0:pi/100:2*pi;
hold on % you much write this before the plot
i=1;
for d=0:0.2:2, % 11 lines in plot are taken
plot(x,sin(x-d),'color',dc(i,:),'linewidth',2)
i=i+1;
end
2.参考http://stackoverflow.com/questions/37111362/matlab-plot-and-color-samples-based-on-data
nlines=length(concentrations);cmap=hsv(nlines)
c=concentrations-min(concentrations);
c=ceil(c/max(c)*nlines);
for ii=1:nlines
plot(wavelength,dataMatrix(ii,:),'Color',cmap(c(ii),:))
hold on;
end
hold off;
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-10-20 00:23
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社