Instead of colormap(jet(4)) create the colormap you want as a 4 x 3 array and colormap() it.
cmap = [1 0 0;
0 1 0;
0 0 1;
0 0 0];
colormap(cmap);
Note: your group variable will be 0, 1, 2, or 3 and so will not map directly to a colormap entry. The code I had suggested to you added 1 to group, getting 1, 2, 3, or 4.
댓글 수: 1
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/444244-change-color-of-section-graph#comment_671745
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/444244-change-color-of-section-graph#comment_671745
댓글을 달려면 로그인하십시오.