[GRASS-SVN] r63420 - grass-addons/grass7/display/d.frame

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 7 05:24:54 PST 2014


Author: martinl
Date: 2014-12-07 05:24:54 -0800 (Sun, 07 Dec 2014)
New Revision: 63420

Modified:
   grass-addons/grass7/display/d.frame/d.frame.html
   grass-addons/grass7/display/d.frame/d.frame.py
Log:
 d.frame: change 'at' to be lower-left (similar to other display modules) - fix r63419
          update example in the manual


Modified: grass-addons/grass7/display/d.frame/d.frame.html
===================================================================
--- grass-addons/grass7/display/d.frame/d.frame.html	2014-12-07 13:10:52 UTC (rev 63419)
+++ grass-addons/grass7/display/d.frame/d.frame.html	2014-12-07 13:24:54 UTC (rev 63420)
@@ -37,27 +37,27 @@
 # remove all frames and erase the current graphics monitor
 d.frame -e
 
-# create a first frame and display 'elevation' raster map including text label and scale
+# create a first frame and display 'landuse96_28m' raster map including text label
 d.frame -c frame=first at=0,50,0,50
+d.rast landuse96_28m
+d.text text='Landuse' bgcolor=220:220:220 color=black size=6
+
+# create a second frame and display 'streams' vector map
+d.frame -c frame=second at=0,50,50,100
+d.vect streams color=blue
+d.text text='Streams' bgcolor=220:220:220 color=black size=6
+
+# create a third frame and display 'elevation' raster map including text label and scale
+d.frame frame=third at=50,100,0,50
 d.rast elevation
 d.text text='Elevation' bgcolor=220:220:220 color=black size=6
 d.barscale at=5,15 style=line bgcolor=none
 
-# create a second frame and display RGB composition map including text label
-d.frame -c frame=second at=0,50,50,100
+# create a fourth frame and display RGB composition map including text label
+d.frame -c frame=fourth at=50,100,50,100
 d.rgb red=lsat7_2002_30 green=lsat7_2002_20 blue=lsat7_2002_10
 d.text text='RGB true colors' bgcolor=220:220:220 color=black size=6
 
-# create a third frame and display 'landuse96_28m' raster map including text label
-d.frame frame=third at=50,100,0,50
-d.rast landuse96_28m
-d.text text='Landuse' bgcolor=220:220:220 color=black size=6
-
-# create a fourth frame and display 'elevation' map including text label
-d.frame -c frame=fourth at=50,100,50,100
-d.vect streams color=blue
-d.text text='Streams' bgcolor=220:220:220 color=black size=6
-
 # release the current graphics monitor
 d.mon -r
 </pre></div>

Modified: grass-addons/grass7/display/d.frame/d.frame.py
===================================================================
--- grass-addons/grass7/display/d.frame/d.frame.py	2014-12-07 13:10:52 UTC (rev 63419)
+++ grass-addons/grass7/display/d.frame/d.frame.py	2014-12-07 13:24:54 UTC (rev 63420)
@@ -156,8 +156,8 @@
     except:
         fatal(_("Invalid frame position: %s") % at)
 
-    top = t / 100. * height
-    bottom = height - b / 100. * height
+    top = height - (t / 100. * height)
+    bottom = height - (b / 100. * height)
     left = l / 100. * width
     right = r / 100. * width
     



More information about the grass-commit mailing list