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