How to remove contour line in filled contour plot?
조회 수: 46(최근 30일)
표시 이전 댓글
댓글: UTKARSH VERMA 2021년 9월 1일
I am plotting a data using contourf but the there is a contour line between the start and end value color even after using the
For example in the attached figure there is a line between dark blue and dark red.
Also, I have tried different colormap but the result is same.
댓글 수: 0
DGM 2021년 8월 31일
편집: DGM 2021년 8월 31일
Hmm. I didn't think about that. I don't know that it can be done with contourf().
% make a simple linear ramp that cycles
[xx yy] = meshgrid(1:100);
zz = xx;
zz = circshift(zz,[0 -30]);
% this is what happens with contourf()
[~,h] = contourf(xx,yy,zz,9,'linecolor','none');
% let's try to replicate it with pcolor()
colormap(jet(10)) % set length to number of levels+1
That's about right. I think it makes the colorbar easier to read anyway.
댓글 수: 3
KSSV 2021년 8월 31일
shading interp ;
댓글 수: 1
Find more on Contour Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!