Skip to content

Commit 4d253d5

Browse files
authored
Convert test to doc figure for grdmix (#8011)
1 parent c6e3cbe commit 4d253d5

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

doc/rst/source/grdmix.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ All *raster?*, *alpha*, *intensity* and *weights* files must have the same
4747
dimensions. The optional *alpha*, *intensity* and *weights* files may be
4848
replaced by constant values instead.
4949

50+
.. figure:: /_images/GMT_mixing.*
51+
:width: 600 px
52+
:align: center
53+
54+
Breaking the NASA blue marble image into its red, green, and blue
55+
components, taking the gradient of the topography at the same
56+
spatial resolution (gray), and combining them to obtained a blue
57+
marble image with slope shading.
58+
5059
Required Arguments
5160
------------------
5261

test/grdmix/mixcompose.sh renamed to doc/scripts/GMT_mixing.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# Test grdmix by deconstructing an image into r,g,b grids the
33
# reassembly to another image.
44

5-
gmt begin mixcompose
6-
gmt set MAP_FRAME_TYPE plain PS_MEDIA letter
5+
gmt begin GMT_mixing
6+
gmt set MAP_FRAME_TYPE plain FONT_ANNOT_PRIMARY 7p,Helvetica,black
7+
gmt grdgradient @earth_relief_20m_p -A45 -Nt1 -Gint.grd
8+
gmt grdimage @earth_day_20m_p -JQ9c -B0 -Iint.grd
79
gmt grdmix @earth_day_01d -D -Glayer_%c.grd
8-
gmt grdmix layer_R.grd layer_G.grd layer_B.grd -Ni -C -Gearth_day.tif
9-
gmt grdimage earth_day.tif -JQ18c -B
10-
gmt subplot begin 2x2 -Fs8.5c/4.25c -JQ8.5c -Rd -Srl -Scb -Y10c -M10p/4p -T"Deconstruct/construct Earth Day"
11-
gmt grdimage @earth_day_01d -c
10+
gmt subplot begin 2x2 -Fs4.2c/2.125c -JQ4.25c -Rd -Srr -Scb -B0 -M1p/0.5p -X9.3c
11+
gmt grdimage int.grd -Cgray -c
1212
gmt makecpt -T0/255 -Cwhite,red -H > t.cpt
1313
gmt grdimage layer_R.grd -Ct.cpt -c
1414
gmt makecpt -T0/255 -Cwhite,green -H > t.cpt
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
outs:
2+
- md5: 2034c03edb88cfe33f2ceeffcc040bce
3+
size: 2225728
4+
hash: md5
5+
path: GMT_mixing.ps

test/baseline/grdmix.dvc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
outs:
2-
- md5: 34cbcc424bd5ec8c24e637bb6b7c4525.dir
3-
size: 241450
4-
nfiles: 2
2+
- md5: 59f039fd8f4375bbdb65d34bbd09d9cc.dir
3+
size: 31145
4+
nfiles: 1
55
path: grdmix
6+
hash: md5

0 commit comments

Comments
 (0)