next up previous contents index
Next: O.3.4 Label placement at Up: O.3 Examples of Contour Previous: O.3.2 Fixed number of   Contents   Index

O.3.3 Prescribed label placements

Here, we specify four points where we would like contour labels to be placed. Our points are not exactly on the contour lines so we give a nonzero ``slop'' to be used in the distance calculations: The point on the contour closest to our fixed points and within the given maximum distance will host the label.





cat << EOF > fix.d
80      -8.5
55      -7.5
102     0
130     10.5
EOF
pscoast -R50/160/-15/15 -JM5.5i -Glightgray -A500 -K -P > GMT_App_O_3.ps
grdcontour geoid.grd -J -O -B20f10WSne -C10 -A20+d+s8 -Gffix.d/0.1i -S10 -T:LH >> GMT_App_O_3.ps





The angle of the label is evaluated from the contour line geometry, and the final result is shown in Figure O.3.

Figure: Four labels are positioned on the points along the contours that are closest to the locations given in the file fix.d in the -Gf option.
\begin{figure}\centering\epsfig{figure=eps/GMT_App_O_3.eps}\end{figure}
To aid in understanding the algorithm we chose to specify ``debug'' mode (+d) which placed a small circle at each of the fixed points.


next up previous contents index
Next: O.3.4 Label placement at Up: O.3 Examples of Contour Previous: O.3.2 Fixed number of   Contents   Index
Paul Wessel 2004-10-01