InquilineKea
InquilineKea

Reputation: 891

Overlapping contour labels?

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?

Upvotes: 1

Views: 2090

Answers (1)

Robert Seifert
Robert Seifert

Reputation: 25232

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

Upvotes: 2

Related Questions