Text keeps going behind topographic map
5 views (last 30 days)
Hi I've used all the stuff below but my plotted text is always behind the land mass, I can see the last few letters of the sentence poking out of the island so i can see its plotted, how do i get the text to be infront?
David Wilson on 29 Mar 2020
Edited: David Wilson on 29 Mar 2020
Your mountains are covering the text (as they should). So you need to write your text above the highest peak, so that it is seen. Use text(x,y,z,'My text here), and make sure the "z" value is high enough, i.e. bigger than the immediate ground under the text.
[X,Y,Z] = peaks(30);
longLow = -1; latLow = 0.5; % will be partially covered
longHi = 0; latHi = 1.5; % will be totally covered
h1 = text(longLow,latLow,11,'textLo'); % altitude of z=11 is above highest mountain
h2 = text(longHi,latHi,11,'textHi');