Change clabel stacking order
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Contour Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!