필터 지우기
필터 지우기

Change clabel stacking order

조회 수: 1 (최근 30일)
Alli Whalley
Alli Whalley 2020년 10월 31일
Hi,
I'm adding clabels to my contourf plot. There are some areas where the labels are stacked on top of each other so you can't see the ones below. I'm ok with this, but I'd like the extreme values to be visible. Currently, they are stacked from low to high, so my positive extreme values are visible but my negative extremes get lost underneath.
This is my current code (which doesn't work):
[y,z] = contourf(ax(1),pos.y1/H,pos.z1/H,zdata(pos.n1),cmap,'showtext','on','linestyle',':'); %plotting
negV = flip(cmap(1:24)); %reordering the vector so extreme neg values occur later (hoping they'll stack on top)
posV = cmap(25:length(cmap));
v = [negV,posV]; %putting them back together
clabel(y,z,v,'fontsize',5,'margin',0.1,'BackGroundColor',[1 1 1],'EdgeColor',[0 0 0],'linewidth',0.1) %adding labels
This is what one of my plots looks like. You can see how the larger negative values are stacked below the smaller negative values.
Thanks!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by