1
votes

So I'm trying to do contour plotting with each contour representing an increment of 0.1 on a correlation map.

[c2,h2] = contourm(GlobalCorrs,geoidrefvec, .2:.1:1,'k','LineWidth',1);
ht2 = clabelm(c2,h2);

The issue is.. when there are multiple closely-spaced contours, they tend to overlap, as shown in the top picture below.

enter image description here

But if I zoom into the bottom picture here, I can see that the 0.4 label was covered by up the 0.2 and 0.3 labels. This is problematic since a correlation of 0.4 is a lot more significant than a correlation of 0.2.

enter image description here

Is there a way to fix this so that either (1) higher correlation labels can cover up lower correlation labels, or (2) where I can get the correlation labels to be more randomly spaced around the figures?

1
I don't really know if this would work, but you could try playing around with setting the LabelSpacing argument of clabelm. It might change the position of the labels slightly around the contour lines. - MrAzzaman
Good idea. I just tried that but it still doesn't seem to work (probably since there is only one label per contour interval). - InquilineKea
(also just tried a smaller value of labelspacing; the additional 0.2 labels still cover up the additional 0.4 labels). - InquilineKea

1 Answers

2
votes

The LabelSpacing property doesn't offer you enough flexibility. It could help in some lucky cases. I'd recommend: just set the labels manually:

clabel(C,h,'manual',...)

giving you a cross hair to define where to set the labels.

enter image description here