Debian Codegraph @

display/d.mon/d.mon.html

raw
1 <h2>DESCRIPTION</h2>
2
3 <em>d.mon</em> allows the user to start, select, list, release, and
4 stop available graphics monitors.
5
6 <h3>Starting a monitor</h3>
7
8 In order to display on-screen GRASS graphics, the user must
9 <b>start</b> and <b>select</b> a graphics monitor. By default,
10 the <b>start</b> command actually runs two commands, to both start and
11 select whatever monitor is named by the user. The user can get a list
12 of running monitors by setting the <b>-l</b> flag on the command
13 line. Note that some monitor <a href="displaydrivers.html">drivers</a> use environment
14 <em><a href="variables.html">variables</a></em> or the specific
15 <em><a href="variables.html#list-of-selected-grass-environment-variables-for-rendering">driver documentation</a></em>.
16
17 <p>When a monitor is <em>started</em>, it is therefore also
18 (automatically) <em>selected</em> for output, unless the
19 <b>-s</b> flag is set by the user; the user can also
20 explicitly <b>select</b> a monitor that has been started.
21
22 <p>The desired monitor should be started once and need not be restarted
23 unless it is stopped for some reason. A monitor may continue to run
24 for any length of time, even when no GRASS session is being run.
25
26 <h3>Stopping a monitor</h3>
27
28 A graphics monitor has two different types of status: monitor
29 program <em>not running</em>, and monitor <em>running</em>. A monitor
30 that has been started and/or selected will be listed as running; a
31 monitor that has been stopped (or not started) will be listed as not
32 running. The <b>-l</b> flag will list all currently running monitors.
33
34 <h3>Selecting a monitor</h3>
35
36 When the user <em>starts</em> a monitor, it is also
37 (automatically) <em>selected</em> for graphics output unless the user
38 sets the <b>-s</b> flag. In order to use (direct graphics output to)
39 a monitor, the user must <em>select</em> that monitor for use, either
40 by simply starting the monitor without the <b>-s</b> flag or by
41 explicitly selecting the monitor for output. Only running monitors can
42 be selected for graphics output.
43
44 <p>The user can run multiple graphics monitors by simply starting each of
45 the graphics monitors the user wishes to direct output to.
46
47 <h3>Releasing (unselecting) a monitor</h3>
48
49 Currently <em>selected</em> a monitor can be released by <b>-r</b>
50 flag.
51
52 <h2>NOTES</h2>
53
54 <em>d.mon</em> is designed for interactive use. If non-interactive use
55 is needed (e.g., in a script) set <code>GRASS_RENDER_IMMEDIATE=png</code>
56 (or <code>=cairo</code>) and use the related environment
57 <a href="variables.html">variables</a> to control output size etc.
58
59 <h2>EXAMPLES</h2>
60
61 <h3>wx0 monitor</h3>
62
63 To start the interactive <em><a href="wxGUI.html#map-display-window">wxGUI map
64 display</a></em>, run
65
66 <div class="code"><pre>
67 d.mon start=wx0
68 </pre></div>
69
70 <div style="margin: 10px" align="center">
71 <img src="d_mon_wx0.png" alt="Blank wx0 display" border="0">
72 <br>
73 <i>Figure: The initialization of display monitor wx0</i>
74 </div>
75
76 All subsequently displayed data will be rendered on monitor <code>wx0</code>.
77
78 <div class="code"><pre>
79 g.region raster=elevation -p
80 d.rast map=elevation
81 </pre></div>
82
83 <div style="margin: 10px" align="center">
84 <img src="d_mon_wx0_raster.png" alt="Display wx0 with raster map" border="0">
85 <br>
86 <i>Figure: The display wx0 showing an elevation raster map</i>
87 </div>
88
89 <h3>CAIRO file renderer monitor</h3>
90
91 A CAIRO monitor can be started (and selected) by
92
93 <div class="code"><pre>
94 d.mon start=cairo output=out.pdf
95 </pre></div>
96
97 From this moment on all displayed data will be rendered into
98 file <code>output.pdf</code>.
99
100 <h3>List running monitors</h3>
101
102 To list the currently running monitors, use
103
104 <div class="code"><pre>
105 d.mon -l
106
107 List of running monitors:
108 wx0
109 cairo
110 </pre></div>
111
112 <h3>Show currently selected monitor</h3>
113
114 To identify the currently selected monitor, use
115
116 <div class="code"><pre>
117 d.mon -p
118
119 cairo
120 </pre></div>
121
122 <h3>Switching between monitors</h3>
123
124 To switch back to interactive display mode, here to an earlier started and
125 still running wxGUI monitor, use
126
127 <div class="code"><pre>
128 d.mon select=wx0
129 </pre></div>
130
131 <h3>Stopping a monitor</h3>
132
133 To close the wxGUI monitor, run
134
135 <div class="code"><pre>
136 d.mon stop=wx0
137 </pre></div>
138
139 <h2>SEE ALSO</h2>
140
141 <em>
142 <a href="d.erase.html">d.erase</a>,
143 <a href="d.redraw.html">d.redraw</a>,
144 <a href="d.rast.html">d.rast</a>,
145 <a href="d.vect.html">d.vect</a>,
146 <a href="d.frame.html">d.frame</a>
147 </em>
148
149 <p>
150 See also <a href="variables.html#list-of-selected-grass-environment-variables-for-rendering">list
151 of variables for rendering</a>,
152 <a href="displaydrivers.html">display drivers</a>
153
154 <h2>AUTHOR</h2>
155
156 Martin Landa, OSGeoREL, Czech Technical University in Prague, Czech Republic