[GRASS-SVN] r33528 - grass/branches/develbranch_6/scripts/d.rast.leg
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 25 03:48:06 EDT 2008
Author: neteler
Date: 2008-09-25 03:48:05 -0400 (Thu, 25 Sep 2008)
New Revision: 33528
Modified:
grass/branches/develbranch_6/scripts/d.rast.leg/d.rast.leg
grass/branches/develbranch_6/scripts/d.rast.leg/description.html
Log:
added flip legend flap (merge from trunk, r33527)
Modified: grass/branches/develbranch_6/scripts/d.rast.leg/d.rast.leg
===================================================================
--- grass/branches/develbranch_6/scripts/d.rast.leg/d.rast.leg 2008-09-25 07:47:33 UTC (rev 33527)
+++ grass/branches/develbranch_6/scripts/d.rast.leg/d.rast.leg 2008-09-25 07:48:05 UTC (rev 33528)
@@ -29,8 +29,8 @@
#
# See also: d.rast, d.legend.
#
+# Jianping Xu and Scott Madry, Rutgers University. October 19, 1993
# Markus Neteler 8/2002: added simple d.legend logic
-# Jianping Xu and Scott Madry, Rutgers University. October 19, 1993
# Markus Neteler 10/2003: added g.parser
# Michael Barton 12/2004: remove reference to (null)
##############################################################################
@@ -40,9 +40,13 @@
#% keywords: display
#%End
#%flag
+#% key: f
+#% description: Flip legend
+#%end
+#%flag
#% key: n
-#% description: omit entries with missing label
-#%END
+#% description: Omit entries with missing label
+#%end
#%option
#% key: map
#% type: string
@@ -70,6 +74,10 @@
OMIT="-n"
fi
+if [ $GIS_FLAG_F -eq 1 ] ; then
+ FLIP="-f"
+fi
+
#for -n flag of d.legend
eval `g.findfile el=cell file=$GIS_OPT_MAP`
if [ ! "$file" ] ; then
@@ -103,9 +111,9 @@
#draw legend
d.frame -s at=0,90,65,100 frame=right
if test -f $HISTFILEDIR/$GIS_OPT_MAP/histogram ; then
- d.legend -n map=$GIS_OPT_MAP
+ d.legend $FLIP -n map=$GIS_OPT_MAP
else
- d.legend $OMIT map=$GIS_OPT_MAP
+ d.legend $FLIP $OMIT map=$GIS_OPT_MAP
fi
#draw map
@@ -126,9 +134,9 @@
#draw legend
d.frame -s at=0,90,65,100 frame=right
if test -f $HISTFILEDIR/$GIS_OPT_MAP/histogram ; then
- d.legend -n map=$GIS_OPT_MAP lines=$GIS_OPT_NUM_OF_LINES
+ d.legend $FLIP -n map=$GIS_OPT_MAP lines=$GIS_OPT_NUM_OF_LINES
else
- d.legend $OMIT map=$GIS_OPT_MAP
+ d.legend $FLIP $OMIT map=$GIS_OPT_MAP
fi
#draw map
Modified: grass/branches/develbranch_6/scripts/d.rast.leg/description.html
===================================================================
--- grass/branches/develbranch_6/scripts/d.rast.leg/description.html 2008-09-25 07:47:33 UTC (rev 33527)
+++ grass/branches/develbranch_6/scripts/d.rast.leg/description.html 2008-09-25 07:48:05 UTC (rev 33528)
@@ -9,7 +9,8 @@
<H2>NOTES</H2>
-
+The legend may be flipped with the <B>-f</B> flag.
+<P>
If the <B>num_of_lines</B> parameter is not given then the legend frame will
display as many lines as number of categories in the map, otherwise, it
will display the first <B>num_of_lines</B> minus 1 categories with the
More information about the grass-commit
mailing list