[cig-commits] commit: fix the tick marks problem in grdmap.sh.

Mercurial hg at geodynamics.org
Fri May 25 02:55:04 PDT 2012


changeset:   119:a52f2193cddd
tag:         tip
user:        Sylvain Barbot <sbarbot at caltech.edu>
date:        Fri May 25 02:54:49 2012 -0700
files:       util/grdmap.sh
description:
fix the tick marks problem in grdmap.sh.


diff -r 379f021d6d78 -r a52f2193cddd util/grdmap.sh
--- a/util/grdmap.sh	Fri May 25 01:25:24 2012 -0700
+++ b/util/grdmap.sh	Fri May 25 02:54:49 2012 -0700
@@ -164,12 +164,6 @@ VECTOR="-"
 VECTOR="-"
 
 
-# tick marks
-if [ "$tset" != "1" ]; then
-	tick=`echo $bds | awk -F "/" '{s=1;print ($2-$1)/s/4}'`
-fi
-tickf=`echo $tick | awk '{print $1/2}'`
-
 # vertical shift of plot
 if [ "$Yset" != "1" ]; then
 	YSHIFT=2.0
@@ -217,6 +211,13 @@ while [ "$#" != "0" -o "$Eset" == "1" ];
 		if [ "$bset" != "1" ]; then
 			bds=`grdinfo -C $U3 | awk '{s=1;print $2/s"/"$3/s"/"$4/s"/"$5/s}'`
 		fi
+
+		# tick marks
+		if [ "$tset" != "1" ]; then
+			tick=`echo $bds | awk -F "/" '{s=1;print ($2-$1)/s/4}'`
+			echo $tick
+		fi
+		tickf=`echo $tick | awk '{print $1/2}'`
 
 		echo $self": Using directory "$WDIR", plotting index "$INDEX
 
@@ -295,6 +296,14 @@ while [ "$#" != "0" -o "$Eset" == "1" ];
 			echo ""
 			usage
 		else
+
+			# tick marks
+			if [ "$tset" != "1" ]; then
+				tick=`echo $bds | awk -F "/" '{s=1;print ($2-$1)/s/4}'`
+				echo $tick
+			fi
+			tickf=`echo $tick | awk '{print $1/2}'`
+
 			# Cartesian vs geographic coordinates
 			if [ "$gset" != "1" ]; then
 				HEIGHT=`echo $bds | awk -F "/" '{printf("%fi\n",($4-$3)/($2-$1)*4)}'`



More information about the CIG-COMMITS mailing list