File: d.background.html

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (43 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download | duplicates (2)
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
<h2>DESCRIPTION</h2>

<em>d.background</em> will fill the image (or generally display monitor)
with a single color specified by the <b>color</b> option.

<h2>NOTES</h2>

<em>d.background</em> is a frontend to <em>d.erase</em> and shares its limitations.
Namely, it does not work with the wx monitors such as <code>d.mon wx0</code>.

<h2>EXAMPLES</h2>

In this example, the <em>streets_wake</em> map from the North Carolina sample
dataset is displayed with custom background color (specified using HTML hex color code)
using <em>cairo</em> display monitor (creates file called <em>map.png</em>):

<div class="code"><pre>
g.region vector=streets_wake
d.mon cairo
d.background color=#ADEFD1
d.vect map=streets_wake color=#00203F legend_label="Streets"
d.legend.vect -b at=70,30 title="Wake County"
</pre></div>

<!--
image generated using the example above
optipng -o5 map.png
-->
<center>
<img src="d_background.png" alt="Street network with legend and background color">
<p>
Figure: Wake County street network with custom background color (North Carolina sample dataset)
</center>

<h2>SEE ALSO</h2>

<em>
<a href="d.erase.html">d.erase</a>
</em>

<h2>AUTHOR</h2>

Vaclav Petras, <a href="https://geospatial.ncsu.edu/geoforall/">NCSU GeoForAll Lab</a>