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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 7 03:46:06 PST 2014


Author: martinl
Date: 2014-12-07 03:46:06 -0800 (Sun, 07 Dec 2014)
New Revision: 63413

Added:
   grass-addons/grass7/display/d.frame/d_frame.png
Modified:
   grass-addons/grass7/display/d.frame/d.frame.html
Log:
d.frame: add example to the manual

Modified: grass-addons/grass7/display/d.frame/d.frame.html
===================================================================
--- grass-addons/grass7/display/d.frame/d.frame.html	2014-12-07 11:06:38 UTC (rev 63412)
+++ grass-addons/grass7/display/d.frame/d.frame.html	2014-12-07 11:46:06 UTC (rev 63413)
@@ -1,9 +1,10 @@
 <h2>DESCRIPTION</h2>
 
-<em>d.frame</em> manages display frames on the user's graphics
+<em>d.frame</em> manages display frames on the current user's graphics
 monitor. Graphics are displayed in rectangular frames on whatever
 graphics monitor the user is currently directing GRASS display output
-to. These frames are created and managed with this module.
+to (defined by <em><a href="d.mon.html">d.mon</a></em> module). These
+frames are created and managed with this module.
 
 <p>
 Note that GRASS frame contents <em>are not</em> retained when one
@@ -13,26 +14,72 @@
 
 <h2>NOTES</h2>
 
-The coordinates for the <b>at</b> option are stated in the form:
-<em>top,bottom,left,right</em> (the values are in percent). The
-upper-left corner of the graphics monitor always is at location 0,0
-while the monitor's lower-right corner is always at 100,100.
+The coordinates for the <b>at</b> option are stated in the form
+<em>top,bottom,left,right</em> values are in percent. The upper-left
+corner of the graphics monitor always is at location 0,0 while the
+monitor's lower-right corner is always at 100,100.
 
 <p>
 If the user has created multiple display frames that overlap one another, 
 whatever the user displays in the active frame will overwrite 
 those portions of the underlying frame where these frames overlap. 
 
+<h2>EXAMPLE</h2>
+
+<div class="code"><pre>
+# start a new graphics monitor, the data will be rendered to
+# /tmp/map.png image output file of size 600x540px
+d.mon cairo out=/tmp/map.png width=600 height=540 --o
+
+# set up region
+g.region rast=elevation
+
+# 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
+d.frame -c frame=first at=0,50,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
+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>
+
+<center>
+  <img src="d_frame.png/" alt="d.frame example"><br>
+  <em>Figure: d.frame example</em>
+</center>
+
 <h2>SEE ALSO</h2>
 
 <em>
   <a href="d.erase.html">d.erase</a>,
-  <a href="d.extend.html">d.extend</a>,
   <a href="d.info.html">d.info</a>,
   <a href="d.mon.html">d.mon</a>,
-  <a href="d.redraw.html">d.redraw</a>,
+  <a href="d.redraw.html">d.redraw</a>
 </em>
 
+<p>
+  <a href="variables.html#rendering">GRASS environment variables for
+  rendering</a> (GRASS_RENDER_FRAME)
+  
 <h2>AUTHOR</h2>
 
 Martin Landa, Czech Technical University in Prague, Czech Republic

Added: grass-addons/grass7/display/d.frame/d_frame.png
===================================================================
(Binary files differ)


Property changes on: grass-addons/grass7/display/d.frame/d_frame.png
___________________________________________________________________
Added: svn:mime-type
   + image/png



More information about the grass-commit mailing list