r=15;
x0=S1(1,1);
y0=S1(1,2);
t=linspace(0, 2*pi, 360);
x=x0+r*cos(t);
y=y0+r*sin(t);
plot(x,y,'black');
hold on;
plot(x0,y0,'.');
hold on;
for m=1:1:584 %這裡是畫出每一點的顏色
x1=S(m,1);
y1=S(m,2);
if(S3(m)>0)
ccc=([0,0,1]*S3(m)+[1,0,0]*(60-S3(m)))/60;
else
ccc=([0,1,0]*(-S3(m))+[1,0,0]*(S3(m)+60))/60;
end
plot(x1,y1,'s','Color',ccc);
hold on;
end
des_color=[];
for m=0:0.01:1 %這FOR迴圈不分就是在讓顏色從綠色區間跑到紅色區間在跑道藍色區間
if(m>0.5)
des_color=[des_color;(2-2*m),0,2*m-1];
else
des_color=[des_color;2*m,1-2*m,0];
end
end
colormap(des_color);
clev=[-60:1:60];
colorbar;
caxis([clev(1) clev(end)]);
可是最後plot出來的color bar是全黑的 不知道問題出在哪裡
數量降低到128個的話,color bar是正常的從負值綠色到中間紅色再到正值藍色
This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.