1d.frame(1) GRASS GIS User's Manual d.frame(1)
2
3
4
6 d.frame - Manages display frames on the user’s graphics monitor.
7
9 display, graphics, monitors, frame
10
12 d.frame
13 d.frame --help
14 d.frame [-cepa] frame=name [at=bottom,top,left,right] [--overwrite]
15 [--help] [--verbose] [--quiet] [--ui]
16
17 Flags:
18 -c
19 Create a new frame if doesn’t exist and select
20
21 -e
22 Remove all frames, erase the screen and exit
23
24 -p
25 Print name of current frame and exit
26
27 -a
28 Print names of all frames including ’at’ position and exit
29
30 --overwrite
31 Allow output files to overwrite existing files
32
33 --help
34 Print usage summary
35
36 --verbose
37 Verbose module output
38
39 --quiet
40 Quiet module output
41
42 --ui
43 Force launching GUI dialog
44
45 Parameters:
46 frame=name [required]
47 Frame to be selected or created (if -c flag is given)
48
49 at=bottom,top,left,right
50 Screen coordinates in percent where to place the frame (0,0 is
51 lower-left)
52 Implies only when -c or --overwrite flag is given
53 Options: 0-100
54
56 d.frame manages display frames on the current user’s graphics monitor.
57 Graphics are displayed in rectangular frames on whatever graphics moni‐
58 tor the user is currently directing GRASS display output to (defined by
59 d.mon module). These frames are created and managed with this module.
60
61 Note that GRASS frame contents are not retained when one frame covers
62 another. You cannot shuffle frames from top to bottom and then back
63 again. They simply define rectangular areas on the screen where subse‐
64 quent drawing will occur.
65
67 The coordinates for the at option are stated in the form top,bot‐
68 tom,left,right values are in percent. The upper-left corner of the
69 graphics monitor always is at location 0,0 while the monitor’s
70 lower-right corner is always at 100,100.
71
72 If the user has created multiple display frames that overlap one an‐
73 other, whatever the user displays in the active frame will overwrite
74 those portions of the underlying frame where these frames overlap.
75
77 # start a new graphics monitor, the data will be rendered to
78 # /tmp/map.png image output file of size 600x540px
79 d.mon cairo out=/tmp/map.png width=600 height=540 --o
80 # set up region
81 g.region raster=elevation
82 # remove all frames and erase the current graphics monitor
83 d.frame -e
84 # create a first frame and display ’landuse96_28m’ raster map including text label
85 # order: bottom,top,left,right - in percent
86 d.frame -c frame=first at=0,50,0,50
87 d.rast landuse96_28m
88 d.text text=’Landuse’ bgcolor=220:220:220 color=black size=6
89 # create a second frame and display ’streams’ vector map
90 d.frame -c frame=second at=0,50,50,100
91 d.vect streams color=blue
92 d.text text=’Streams’ bgcolor=220:220:220 color=black size=6
93 # create a third frame and display ’elevation’ raster map including text label and scale
94 d.frame -c frame=third at=50,100,0,50
95 d.rast elevation
96 d.text text=’Elevation’ bgcolor=220:220:220 color=black size=6
97 d.barscale at=0,10 style=line bgcolor=none
98 # create a fourth frame and display RGB composition map including text label
99 d.frame -c frame=fourth at=50,100,50,100
100 d.rgb red=lsat7_2002_30 green=lsat7_2002_20 blue=lsat7_2002_10
101 d.text text=’RGB true colors’ bgcolor=220:220:220 color=black size=6
102 # release the current graphics monitor
103 d.mon -r
104 Figure: d.frame example
105
107 d.erase, d.info, d.mon, d.redraw
108
109 GRASS environment variables for rendering (GRASS_RENDER_FRAME)
110
112 Martin Landa, Czech Technical University in Prague, Czech Republic
113
114 Based on d.frame from GRASS 6:
115 James Westervelt, U.S. Army Construction Engineering Research Labora‐
116 tory
117 Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
118
120 Available at: d.frame source code (history)
121
122 Accessed: Saturday Jan 21 20:40:59 2023
123
124 Main index | Display index | Topics index | Keywords index | Graphical
125 index | Full index
126
127 © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
128
129
130
131GRASS 8.2.1 d.frame(1)