diff --git a/cmake/ConfigUserAdvancedTemplate.cmake b/cmake/ConfigUserAdvancedTemplate.cmake index 51a792c9da9..d74f3f42a7f 100644 --- a/cmake/ConfigUserAdvancedTemplate.cmake +++ b/cmake/ConfigUserAdvancedTemplate.cmake @@ -236,6 +236,7 @@ #add_definitions(-DUSE_COMMON_LONG_OPTIONS) # Turn on testing of upcoming long-option syntax for common GMT options #add_definitions(-DUSE_MODULE_LONG_OPTIONS) # Turn on testing of upcoming long-option syntax for module options #add_definitions(-DEXPORT_GMTLIB) # Turn on to access normally un-exported or static gmtlib functions from external tools +#add_definitions(-DNO_THEMES) # Turn off implementation of GMT_THEME for debugging #set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement ${CMAKE_C_FLAGS}") # recommended even for release build #set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}") # extra warnings diff --git a/doc/examples/anim01/anim01.ps b/doc/examples/anim01/anim01.ps index c1d6788fd0f..703f832c691 100644 Binary files a/doc/examples/anim01/anim01.ps and b/doc/examples/anim01/anim01.ps differ diff --git a/doc/examples/anim02/anim02.ps b/doc/examples/anim02/anim02.ps index fa847c491f7..12fecb9a2b4 100644 Binary files a/doc/examples/anim02/anim02.ps and b/doc/examples/anim02/anim02.ps differ diff --git a/doc/examples/anim02/anim02.sh b/doc/examples/anim02/anim02.sh index c9056a8e88a..3b618d1552f 100755 --- a/doc/examples/anim02/anim02.sh +++ b/doc/examples/anim02/anim02.sh @@ -24,10 +24,10 @@ cat << EOF > main.sh gmt begin width=\$(gmt math -Q \${MOVIE_WIDTH} 0.5i SUB =) gmt grdimage topo.nc -I+a\${MOVIE_COL0}+nt2 -JM\${width} -Cmain.cpt \ - -BWSne -B1 -X0.35i -Y0.3i --FONT_ANNOT_PRIMARY=9p + -BWSne -B1 -X0.4i -Y0.3i --FONT_ANNOT_PRIMARY=9p gmt plot -Sc0.8i -Gwhite -Wthin <<< "256.25 35.6" gmt plot -Sv0.1i+e -Gred -Wthick <<< "256.25 35.6 \${MOVIE_COL1} 0.37i" gmt end EOF # 3. Run the movie -gmt movie main.sh -C3.5ix4.167ix72 -Nanim02 -Tangles.txt -Sbpre.sh -D6 -Zs $opt +gmt movie main.sh -C3.7ix4.167ix72 -Nanim02 -Tangles.txt -Sbpre.sh -D6 -Zs $opt diff --git a/doc/examples/anim03/anim03.ps b/doc/examples/anim03/anim03.ps index 9d88f531f88..7da4e00d511 100644 Binary files a/doc/examples/anim03/anim03.ps and b/doc/examples/anim03/anim03.ps differ diff --git a/doc/examples/anim05/anim05.ps b/doc/examples/anim05/anim05.ps index 9ead3b87f13..d6aad39a02b 100644 Binary files a/doc/examples/anim05/anim05.ps and b/doc/examples/anim05/anim05.ps differ diff --git a/doc/examples/anim05/anim05.sh b/doc/examples/anim05/anim05.sh index ab594ad7a55..94d9d37dd6f 100755 --- a/doc/examples/anim05/anim05.sh +++ b/doc/examples/anim05/anim05.sh @@ -22,7 +22,7 @@ cat << EOF > main.sh gmt begin let k=\${MOVIE_FRAME}+1 gmt greenspline @Table_5_11.txt -R0/6.5/0/6.5 -I0.05 -Sc -Gt.nc -Z1 -Cn\${k} -Emisfit.txt - gmt grdcontour t.nc -C25 -A50 -Baf -BWsNE -JX4i -Gl3.6/6.5/4.05/0.75 -Xc -Y0.4i + gmt grdcontour t.nc -C25 -A50 -Baf -BWsNE -JX4i -Gl3.6/6.5/4.05/0.75 -Xc -Y0.6i gmt plot misfit.txt -Ct.cpt -Sc0.15c -Wfaint -i0,1,4 printf "%2.2d" \$k | gmt text -F+cTR+jTR+f18p -Dj0.1i -Gwhite -W0.25p gmt colorbar -Ct.cpt -DJBC+e -Bxaf -By+l"misfit" diff --git a/doc/examples/ex01/ex01.ps b/doc/examples/ex01/ex01.ps index 4091ee0f8b6..084010baf34 100644 Binary files a/doc/examples/ex01/ex01.ps and b/doc/examples/ex01/ex01.ps differ diff --git a/doc/examples/ex01/ex01.sh b/doc/examples/ex01/ex01.sh index 6542dc6cd96..6c549d8133e 100755 --- a/doc/examples/ex01/ex01.sh +++ b/doc/examples/ex01/ex01.sh @@ -2,10 +2,9 @@ # GMT EXAMPLE 01 # # Purpose: Make two contour maps based on the data in the file osu91a1f_16.nc -# GMT modules: set, subplot, grdcontour, coast +# GMT modules: subplot, grdcontour, coast # gmt begin ex01 - gmt set MAP_GRID_CROSS_SIZE_PRIMARY 0 FONT_ANNOT_PRIMARY 10p gmt subplot begin 2x1 -A -M0.5c -Blrtb -Bafg -T"Low Order Geoid" -Fs16c/0 -Rg -JH16c gmt coast -JH? -Glightbrown -Slightblue -c0,0 gmt grdcontour @osu91a1f_16.nc -C10 -A50+f7p -Gd10c -Ln -Wcthinnest,- -Wathin,- -T+d8p/2p+l diff --git a/doc/examples/ex02/ex02.ps b/doc/examples/ex02/ex02.ps index 8111ffe7236..5a0e8f5ec5d 100644 Binary files a/doc/examples/ex02/ex02.ps and b/doc/examples/ex02/ex02.ps differ diff --git a/doc/examples/ex02/ex02.sh b/doc/examples/ex02/ex02.sh index ee24dd26a31..d513436050b 100755 --- a/doc/examples/ex02/ex02.sh +++ b/doc/examples/ex02/ex02.sh @@ -10,11 +10,11 @@ gmt begin ex02 gmt subplot set 0,0 -Ce3c gmt grd2cpt @HI_topo_02.nc -Crelief -Z gmt grdimage @HI_topo_02.nc -I+a0 - gmt colorbar -DJRM+o1.5c/0+mc -I0.3 -Bx2+lTOPO -By+lkm + gmt colorbar -DJRM+o1c/0+mc -I0.3 -Bx2+lTOPO -By+lkm gmt subplot set 1,0 -Ce3c gmt makecpt -Crainbow -T-2/14/2 gmt grdimage @HI_geoid_02.nc - gmt colorbar -DJRM+o1.5c/0+e+mc -Bx2+lGEOID -By+lm + gmt colorbar -DJRM+o1c/0+e+mc -Bx2+lGEOID -By+lm gmt subplot end gmt end show diff --git a/doc/examples/ex03/ex03.ps b/doc/examples/ex03/ex03.ps index cf3413d768c..3bbdb483cf3 100644 Binary files a/doc/examples/ex03/ex03.ps and b/doc/examples/ex03/ex03.ps differ diff --git a/doc/examples/ex04/ex04.ps b/doc/examples/ex04/ex04.ps index 24929b33777..9cf83baaa87 100644 Binary files a/doc/examples/ex04/ex04.ps and b/doc/examples/ex04/ex04.ps differ diff --git a/doc/examples/ex04/ex04c.ps b/doc/examples/ex04/ex04c.ps index 9a96e791930..d4e38ab4e6d 100644 Binary files a/doc/examples/ex04/ex04c.ps and b/doc/examples/ex04/ex04c.ps differ diff --git a/doc/examples/ex05/ex05.ps b/doc/examples/ex05/ex05.ps index 9af1c5fc233..1e9dfda0a6d 100644 Binary files a/doc/examples/ex05/ex05.ps and b/doc/examples/ex05/ex05.ps differ diff --git a/doc/examples/ex06/ex06.ps b/doc/examples/ex06/ex06.ps index 1422a6096cc..898ccd9e468 100644 Binary files a/doc/examples/ex06/ex06.ps and b/doc/examples/ex06/ex06.ps differ diff --git a/doc/examples/ex07/ex07.ps b/doc/examples/ex07/ex07.ps index 81cdbedfe92..f77f63e038c 100644 Binary files a/doc/examples/ex07/ex07.ps and b/doc/examples/ex07/ex07.ps differ diff --git a/doc/examples/ex08/ex08.ps b/doc/examples/ex08/ex08.ps index eadb3ec6971..72430163552 100644 Binary files a/doc/examples/ex08/ex08.ps and b/doc/examples/ex08/ex08.ps differ diff --git a/doc/examples/ex09/ex09.ps b/doc/examples/ex09/ex09.ps index 26178fcf086..ffdcfc64512 100644 Binary files a/doc/examples/ex09/ex09.ps and b/doc/examples/ex09/ex09.ps differ diff --git a/doc/examples/ex09/ex09.sh b/doc/examples/ex09/ex09.sh index 2062596fefe..9de3ad443a8 100755 --- a/doc/examples/ex09/ex09.sh +++ b/doc/examples/ex09/ex09.sh @@ -10,5 +10,5 @@ gmt begin ex09 gmt plot @ridge_09.txt -Wthicker gmt plot @fz_09.txt -Wthinner,- # Take label from segment header and plot near coordinates of last record of each track - gmt convert -El @tracks_09.txt | gmt text -F+f10p,Helvetica-Bold+a50+jRM+h -D-4p + gmt convert -El @tracks_09.txt | gmt text -F+f10p,Helvetica-Bold+a50+jRM+h -D-4p -Ghoneydew gmt end show diff --git a/doc/examples/ex10/ex10.ps b/doc/examples/ex10/ex10.ps index 86464e02028..8ed52748547 100644 Binary files a/doc/examples/ex10/ex10.ps and b/doc/examples/ex10/ex10.ps differ diff --git a/doc/examples/ex11/ex11.ps b/doc/examples/ex11/ex11.ps index 99fb93ced88..e73874ccecd 100644 Binary files a/doc/examples/ex11/ex11.ps and b/doc/examples/ex11/ex11.ps differ diff --git a/doc/examples/ex12/ex12.ps b/doc/examples/ex12/ex12.ps index 1edaf5a2d3d..807963b1e94 100644 Binary files a/doc/examples/ex12/ex12.ps and b/doc/examples/ex12/ex12.ps differ diff --git a/doc/examples/ex13/ex13.ps b/doc/examples/ex13/ex13.ps index e3d594a9306..bc18be9af37 100644 Binary files a/doc/examples/ex13/ex13.ps and b/doc/examples/ex13/ex13.ps differ diff --git a/doc/examples/ex14/ex14.ps b/doc/examples/ex14/ex14.ps index 1861271978e..ce4036768c0 100644 Binary files a/doc/examples/ex14/ex14.ps and b/doc/examples/ex14/ex14.ps differ diff --git a/doc/examples/ex15/ex15.ps b/doc/examples/ex15/ex15.ps index 206e07004fb..b0cf2a20c22 100644 Binary files a/doc/examples/ex15/ex15.ps and b/doc/examples/ex15/ex15.ps differ diff --git a/doc/examples/ex16/ex16.ps b/doc/examples/ex16/ex16.ps index c69920cfeb9..893056e9b9c 100644 Binary files a/doc/examples/ex16/ex16.ps and b/doc/examples/ex16/ex16.ps differ diff --git a/doc/examples/ex16/ex16.sh b/doc/examples/ex16/ex16.sh index 43882ae1ee9..9da9c0f37e3 100755 --- a/doc/examples/ex16/ex16.sh +++ b/doc/examples/ex16/ex16.sh @@ -6,7 +6,6 @@ # Unix progs: rm # gmt begin ex16 - gmt set FONT_ANNOT_PRIMARY 9p FONT_TITLE 18p,Times-Roman gmt subplot begin 2x2 -M0.1c -Fs8c/0 -R0/6.5/-0.2/6.5 -Jx1c -SCb -SRl+t -Bwesn -T"Gridding of Data" gmt surface @Table_5_11.txt -I0.2 -Graws0.nc gmt contour @Table_5_11.txt -C@ex_16.cpt -I -B+t"contour (triangulate)" -c0,0 diff --git a/doc/examples/ex17/ex17.ps b/doc/examples/ex17/ex17.ps index e67529289b3..0a6b3fccabb 100644 Binary files a/doc/examples/ex17/ex17.ps and b/doc/examples/ex17/ex17.ps differ diff --git a/doc/examples/ex18/ex18.ps b/doc/examples/ex18/ex18.ps index 305b180ebd5..1b42916359a 100644 Binary files a/doc/examples/ex18/ex18.ps and b/doc/examples/ex18/ex18.ps differ diff --git a/doc/examples/ex19/ex19.ps b/doc/examples/ex19/ex19.ps index 88c8d88bd7d..65e5dc88484 100644 Binary files a/doc/examples/ex19/ex19.ps and b/doc/examples/ex19/ex19.ps differ diff --git a/doc/examples/ex19/ex19.sh b/doc/examples/ex19/ex19.sh index 655e80b3424..f0b006d4917 100755 --- a/doc/examples/ex19/ex19.sh +++ b/doc/examples/ex19/ex19.sh @@ -16,9 +16,9 @@ gmt begin ex19 gmt grdimage lon.nc -Clon.cpt -nl gmt coast -Q gmt coast -Dc -A5000 -Wthinnest - echo "0 20 16TH INTERNATIONAL" | gmt text -F+f32p,Helvetica-Bold,red=thinner + echo "0 20 17TH INTERNATIONAL" | gmt text -F+f32p,Helvetica-Bold,red=thinner echo "0 -10 GMT CONFERENCE" | gmt text -F+f32p,Helvetica-Bold,red=thinner - echo "0 -30 Honolulu, Hawaii, April 1, 2020" | gmt text -F+f18p,Helvetica-Bold,green=thinnest + echo "0 -30 Honolulu, Hawaii, April 1, 2021" | gmt text -F+f18p,Helvetica-Bold,green=thinnest # Then show example of color patterns and placing a PostScript image gmt coast -Dc -A5000 -Gp86+fred+byellow+r100 -Sp@circuit.png+r100 -c1,0 echo "0 30 SILLY USES OF" | gmt text -F+f32p,Helvetica-Bold,lightgreen=thinner @@ -30,9 +30,9 @@ gmt begin ex19 gmt grdimage lat.nc -Clat.cpt -nl gmt coast -Q gmt coast -Dc -A5000 -Wthinnest - echo "0 20 16TH INTERNATIONAL" | gmt text -F+f32p,Helvetica-Bold,red=thinner + echo "0 20 17TH INTERNATIONAL" | gmt text -F+f32p,Helvetica-Bold,red=thinner echo "0 -10 GMT CONFERENCE" | gmt text -F+f32p,Helvetica-Bold,red=thinner - echo "0 -30 Honolulu, Hawaii, April 1, 2020" | gmt text -F+f18p,Helvetica-Bold,green=thinnest + echo "0 -30 Honolulu, Hawaii, April 1, 2021" | gmt text -F+f18p,Helvetica-Bold,green=thinnest gmt subplot end gmt end show rm -f lat.nc lon.nc lat.cpt lon.cpt diff --git a/doc/examples/ex20/ex20.ps b/doc/examples/ex20/ex20.ps index 885533f8fd0..442cb2b8ab5 100644 Binary files a/doc/examples/ex20/ex20.ps and b/doc/examples/ex20/ex20.ps differ diff --git a/doc/examples/ex21/ex21.ps b/doc/examples/ex21/ex21.ps index dde7d71e57f..304fb4452fe 100644 Binary files a/doc/examples/ex21/ex21.ps and b/doc/examples/ex21/ex21.ps differ diff --git a/doc/examples/ex22/ex22.ps b/doc/examples/ex22/ex22.ps index c60c141caf2..4052af3b7c6 100644 Binary files a/doc/examples/ex22/ex22.ps and b/doc/examples/ex22/ex22.ps differ diff --git a/doc/examples/ex22/ex22.sh b/doc/examples/ex22/ex22.sh index 4bffc950f27..74626afecd1 100755 --- a/doc/examples/ex22/ex22.sh +++ b/doc/examples/ex22/ex22.sh @@ -2,12 +2,10 @@ # GMT EXAMPLE 22 # # Purpose: Automatic map of last month of world-wide seismicity -# GMT modules: set, coast, plot, legend +# GMT modules: coast, plot, legend # Unix progs: cat, sed, awk, wget|curl # gmt begin ex22 - gmt set FONT_ANNOT_PRIMARY 10p FONT_TITLE 18p FORMAT_GEO_MAP ddd:mm:ssF - # Get the data (-s silently) from USGS using the curl # Hardwired here to the month of October, 2017 # SITE="https://earthquake.usgs.gov/fdsnws/event/1/query.csv" @@ -81,7 +79,7 @@ gmt begin ex22 # OK, now we can actually run gmt legend. We center the legend below the map. # Trial and error shows that 1.7i is a good legend height: - gmt legend -DJBC+o0/1c+w18c/4.2c -F+p+glightyellow neis.legend + gmt legend -DJBC+o0/1c+w18c/4.2c -F+p+glightyellow neis.legend --FONT_ANNOT_PRIMARY=10p,Helvetica rm neis.legend usgs_quakes_22.txt gmt end show diff --git a/doc/examples/ex23/ex23.ps b/doc/examples/ex23/ex23.ps index 735c79aae36..3c1e18c7b2e 100644 Binary files a/doc/examples/ex23/ex23.ps and b/doc/examples/ex23/ex23.ps differ diff --git a/doc/examples/ex24/ex24.ps b/doc/examples/ex24/ex24.ps index 277a54c5dc6..2f02e3cbc55 100644 Binary files a/doc/examples/ex24/ex24.ps and b/doc/examples/ex24/ex24.ps differ diff --git a/doc/examples/ex25/ex25.ps b/doc/examples/ex25/ex25.ps index 541c6ccee41..ce165ebc033 100644 Binary files a/doc/examples/ex25/ex25.ps and b/doc/examples/ex25/ex25.ps differ diff --git a/doc/examples/ex26/ex26.ps b/doc/examples/ex26/ex26.ps index 665f98d5db8..08365686390 100644 Binary files a/doc/examples/ex26/ex26.ps and b/doc/examples/ex26/ex26.ps differ diff --git a/doc/examples/ex27/ex27.ps b/doc/examples/ex27/ex27.ps index fff860dff59..80b2949e918 100644 Binary files a/doc/examples/ex27/ex27.ps and b/doc/examples/ex27/ex27.ps differ diff --git a/doc/examples/ex28/ex28.ps b/doc/examples/ex28/ex28.ps index 27933b1c235..4c1518b6901 100644 Binary files a/doc/examples/ex28/ex28.ps and b/doc/examples/ex28/ex28.ps differ diff --git a/doc/examples/ex29/ex29.ps b/doc/examples/ex29/ex29.ps index b3b28861a8f..4ae6277c957 100644 Binary files a/doc/examples/ex29/ex29.ps and b/doc/examples/ex29/ex29.ps differ diff --git a/doc/examples/ex30/ex30.ps b/doc/examples/ex30/ex30.ps index 4a5a1b37b50..b13ec72c8f7 100644 Binary files a/doc/examples/ex30/ex30.ps and b/doc/examples/ex30/ex30.ps differ diff --git a/doc/examples/ex31/ex31.ps b/doc/examples/ex31/ex31.ps index ba2c59d797f..88068c78ab3 100644 Binary files a/doc/examples/ex31/ex31.ps and b/doc/examples/ex31/ex31.ps differ diff --git a/doc/examples/ex33/ex33.ps b/doc/examples/ex33/ex33.ps index 2a828cb3c6a..ce6cafad724 100644 Binary files a/doc/examples/ex33/ex33.ps and b/doc/examples/ex33/ex33.ps differ diff --git a/doc/examples/ex34/ex34.ps b/doc/examples/ex34/ex34.ps index 48a0e3950ec..9c8889e37c2 100644 Binary files a/doc/examples/ex34/ex34.ps and b/doc/examples/ex34/ex34.ps differ diff --git a/doc/examples/ex34/ex34.sh b/doc/examples/ex34/ex34.sh index f4b208f6b6a..1af4c6d0707 100755 --- a/doc/examples/ex34/ex34.sh +++ b/doc/examples/ex34/ex34.sh @@ -5,7 +5,7 @@ # GMT modules: set, coast, makecpt, grdimage, subplot # gmt begin ex34 - gmt set FORMAT_GEO_MAP dddF FONT_HEADING 24p + gmt set FONT_HEADING 24p gmt makecpt -Cglobe -T-5000/5000 gmt subplot begin 2x1 -Fs11c/0 -M0.1c -JM11c -R-6/20/35/52 -SRl -SCb -Bwesn -T"Franco-Italian Union, 2042-45" gmt coast -EFR,IT+gP300/8 -Glightgray -c1,0 diff --git a/doc/examples/ex35/ex35.ps b/doc/examples/ex35/ex35.ps index 15574ce6026..8fc5b727d32 100644 Binary files a/doc/examples/ex35/ex35.ps and b/doc/examples/ex35/ex35.ps differ diff --git a/doc/examples/ex36/ex36.ps b/doc/examples/ex36/ex36.ps index e324f7ecd8b..7e66fd53fde 100644 Binary files a/doc/examples/ex36/ex36.ps and b/doc/examples/ex36/ex36.ps differ diff --git a/doc/examples/ex37/ex37.ps b/doc/examples/ex37/ex37.ps index 93049fc9c31..845128d8b72 100644 Binary files a/doc/examples/ex37/ex37.ps and b/doc/examples/ex37/ex37.ps differ diff --git a/doc/examples/ex37/ex37.sh b/doc/examples/ex37/ex37.sh index e36f9f4d35a..2816b57cbbd 100755 --- a/doc/examples/ex37/ex37.sh +++ b/doc/examples/ex37/ex37.sh @@ -11,7 +11,7 @@ gmt begin ex37 # Prefix of two .nc files G=grav.V18.par.surf.1km.sq T=mb.par.surf.1km.sq - gmt set FONT_TITLE 14p GMT_FFT kiss + gmt set GMT_FFT kiss gmt grdinfo @$T.nc -Ib > bbox scl=1.4e-5 diff --git a/doc/examples/ex38/ex38.ps b/doc/examples/ex38/ex38.ps index 7c632d11c5d..224cacaf7e6 100644 Binary files a/doc/examples/ex38/ex38.ps and b/doc/examples/ex38/ex38.ps differ diff --git a/doc/examples/ex39/ex39.ps b/doc/examples/ex39/ex39.ps index 6e70a51e636..24979080ecf 100644 Binary files a/doc/examples/ex39/ex39.ps and b/doc/examples/ex39/ex39.ps differ diff --git a/doc/examples/ex40/ex40.ps b/doc/examples/ex40/ex40.ps index 7bdd12ef2fa..cfdedd06b94 100644 Binary files a/doc/examples/ex40/ex40.ps and b/doc/examples/ex40/ex40.ps differ diff --git a/doc/examples/ex41/ex41.ps b/doc/examples/ex41/ex41.ps index ecc596351c9..b15960d364b 100644 Binary files a/doc/examples/ex41/ex41.ps and b/doc/examples/ex41/ex41.ps differ diff --git a/doc/examples/ex41/ex41.sh b/doc/examples/ex41/ex41.sh index 20aca276623..214fb85ffbe 100755 --- a/doc/examples/ex41/ex41.sh +++ b/doc/examples/ex41/ex41.sh @@ -5,7 +5,7 @@ # GMT modules: set, coast, legend, plot, makecpt # gmt begin ex41 - gmt set FONT_ANNOT_PRIMARY 12p FONT_LABEL 12p + gmt set FONT_ANNOT_PRIMARY 12p,Helvetica FONT_LABEL 12p,Helvetica gmt makecpt -Cred,orange,yellow,green,bisque,cyan,magenta,white,gray -T1/10/1 -N gmt coast -R130W/50W/8N/56N -JM14c -Glightgray -Sazure1 -A1000 -Wfaint gmt coast -EUS+glightyellow+pfaint -ECU+glightred+pfaint -EMX+glightgreen+pfaint -ECA+glightblue+pfaint diff --git a/doc/examples/ex42/ex42.ps b/doc/examples/ex42/ex42.ps index 645a48310b2..714dad52cc5 100644 Binary files a/doc/examples/ex42/ex42.ps and b/doc/examples/ex42/ex42.ps differ diff --git a/doc/examples/ex42/ex42.sh b/doc/examples/ex42/ex42.sh index fc57a8e0079..f15fd985e99 100755 --- a/doc/examples/ex42/ex42.sh +++ b/doc/examples/ex42/ex42.sh @@ -2,11 +2,11 @@ # GMT EXAMPLE 42 # # Purpose: Illustrate Antarctica and stereographic projection -# GMT modules: makecpt, grdimage, coast, legend, colorbar, text, plot +# GMT modules: makecpt, grdimage, coast, legend, colorbar, set, text, plot # Unix progs: [curl grdconvert] # gmt begin ex42 - gmt set FONT_ANNOT_PRIMARY 12p FONT_LABEL 12p PROJ_ELLIPSOID WGS-84 FORMAT_GEO_MAP dddF + gmt set PROJ_ELLIPSOID WGS-84 # Data obtained via website and converted to netCDF thus: # curl http://www.antarctica.ac.uk//bas_research/data/access/bedmap/download/bedelev.asc.gz # gunzip bedelev.asc.gz @@ -14,16 +14,16 @@ gmt begin ex42 gmt makecpt -Cearth -T-7000/4000 gmt grdimage @BEDMAP_elevation.nc -Jx1:60000000 -Q gmt coast -R-180/180/-90/-60 -Js0/-90/-71/1:60000000 -Bafg -Di -W0.25p - gmt colorbar -DJRM+w6.5c/0.5c+o1.5c/0+mc -F+p+i -Bxa1000+lELEVATION -By+lm + gmt colorbar -DJRM+w6.5c/0.5c+o1c/0+mc -F+p+i -Bxa1000+lELEVATION -By+lm # GSHHG gmt coast -Glightblue -Sroyalblue2 -X5c -Y12c gmt coast -Glightbrown -A+ag -Bafg - gmt legend -DjLM+w4c+jRM+o1c/0 -F+p+i <<- EOF - H 18p,Times-Roman Legend + gmt legend -DjLM+w3.5c+jRM+o1c/0 -F+p+i <<- EOF + H 12 Legend D 0.25c 1p - S 0.4c s 0.5c blue 0.25p 0.75c Ocean - S 0.4c s 0.5c lightblue 0.25p 0.75c Ice front - S 0.4c s 0.5c lightbrown 0.25p 0.75c Grounding line + S 0.4c s 0.3c blue 0.25p 0.75c Ocean + S 0.4c s 0.3c lightblue 0.25p 0.75c Ice front + S 0.4c s 0.3c lightbrown 0.25p 0.75c Grounding line EOF # Fancy line gmt plot -R0/19/0/25 -Jx1c -B0 -W2p -X-6c -Y-13.5c <<- EOF diff --git a/doc/examples/ex43/ex43.ps b/doc/examples/ex43/ex43.ps index 56d2d3af2e6..e5ab1393e46 100644 Binary files a/doc/examples/ex43/ex43.ps and b/doc/examples/ex43/ex43.ps differ diff --git a/doc/examples/ex44/ex44.ps b/doc/examples/ex44/ex44.ps index 7f1bbaa6d21..a099236a1fa 100644 Binary files a/doc/examples/ex44/ex44.ps and b/doc/examples/ex44/ex44.ps differ diff --git a/doc/examples/ex45/ex45.ps b/doc/examples/ex45/ex45.ps index 5e1c2d45972..89e82e07787 100644 Binary files a/doc/examples/ex45/ex45.ps and b/doc/examples/ex45/ex45.ps differ diff --git a/doc/examples/ex46/ex46.ps b/doc/examples/ex46/ex46.ps index 5ab719ba100..9a8739fc089 100644 Binary files a/doc/examples/ex46/ex46.ps and b/doc/examples/ex46/ex46.ps differ diff --git a/doc/examples/ex47/ex47.ps b/doc/examples/ex47/ex47.ps index 90937fceda4..8c4287cfc79 100644 Binary files a/doc/examples/ex47/ex47.ps and b/doc/examples/ex47/ex47.ps differ diff --git a/doc/examples/ex48/ex48.ps b/doc/examples/ex48/ex48.ps index 3bc15f8be77..9cbde4cc073 100644 Binary files a/doc/examples/ex48/ex48.ps and b/doc/examples/ex48/ex48.ps differ diff --git a/doc/examples/ex49/ex49.ps b/doc/examples/ex49/ex49.ps index e8aa06c1f51..a5017d32fcf 100644 Binary files a/doc/examples/ex49/ex49.ps and b/doc/examples/ex49/ex49.ps differ diff --git a/doc/examples/ex49/ex49.sh b/doc/examples/ex49/ex49.sh index 70a5d6ca792..978ad337056 100755 --- a/doc/examples/ex49/ex49.sh +++ b/doc/examples/ex49/ex49.sh @@ -13,7 +13,7 @@ gmt begin ex49 # Image depths with color-coded age contours gmt makecpt -Cabyss -T-7000/0 -H > z.cpt gmt makecpt -Chot -T0/100/10 -H > t.cpt - gmt grdimage depth_pixel.nc -JM15c -Cz.cpt -B -BWSne --FORMAT_GEO_MAP=dddF + gmt grdimage depth_pixel.nc -JM15c -Cz.cpt -B -BWSne --FORMAT_GEO_MAP=dddF --FONT_ANNOT_PRIMARY=12p gmt plot -W1p @ridge_49.txt gmt grdcontour age_pixel.nc -A+f14p -Ct.cpt -Wa0.1p+c -GL30W/22S/5E/13S gmt colorbar -Cz.cpt -DjTR+w5c/0.4c+h+o0.75c/0.4c -Baf+u" km" -W0.001 -F+p1p+gbeige @@ -42,7 +42,7 @@ gmt begin ex49 gmt plot ss.txt -W1p gmt plot -Ss0.4c -Gblue modal.txt -Ey+p1p,blue gmt plot -Ss0.1c -Gwhite modal.txt - gmt basemap -R0/100/0/6.5 -JX15c/-10c -Bxaf+u" Myr" -Byaf+u" km" -BWsNe + gmt basemap -R0/100/0/6.5 -JX15c/-10c -Bxaf+u" Myr" -Byaf+u" km" -BWsNe --FONT_ANNOT_PRIMARY=12p gmt legend -DjRT+w6.5c+o0.25c -F+p1p+gbeige+s <<- EOF S 0.5c - 0.9c - 4p,green 1c Parsons & Sclater (1977) S 0.5c - 0.9c - 4p,white 1c Stein & Stein (1992) diff --git a/doc/examples/ex50/ex50.ps b/doc/examples/ex50/ex50.ps index 63b5aede7ef..30765ccf116 100644 Binary files a/doc/examples/ex50/ex50.ps and b/doc/examples/ex50/ex50.ps differ diff --git a/doc/examples/ex50/ex50.sh b/doc/examples/ex50/ex50.sh index 4777fb79562..557c35dea80 100755 --- a/doc/examples/ex50/ex50.sh +++ b/doc/examples/ex50/ex50.sh @@ -7,7 +7,6 @@ gmt begin ex50 # Left column have all the PDFs - gmt set FONT_ANNOT_PRIMARY 10p,Helvetica,black # Binomial distribution gmt math -T0/8/1 0.25 8 T BPDF = p.txt gmt plot -R-0.6/8.6/0/0.35 -JX7.5c/1.25c -Glightgreen p.txt -Sb0.8u -W0.5p -BWS -Bxa1 -Byaf diff --git a/doc/examples/ex52/ex52.ps b/doc/examples/ex52/ex52.ps index d568452e019..301a467c44c 100644 Binary files a/doc/examples/ex52/ex52.ps and b/doc/examples/ex52/ex52.ps differ diff --git a/doc/rst/source/cookbook/features.rst b/doc/rst/source/cookbook/features.rst index 7984541d0ec..85ac66df123 100644 --- a/doc/rst/source/cookbook/features.rst +++ b/doc/rst/source/cookbook/features.rst @@ -276,6 +276,73 @@ placed in a separate parameter file: scenarios into separate ``gmt.conf`` files will minimize headaches associated with micro-editing of illustrations. + +.. _auto-scaling: + +Automatic GMT settings +~~~~~~~~~~~~~~~~~~~~~~ + +The **auto** flag for :doc:`GMT parameters ` signals that suitable +dimensions or settings will be automatically computed when the plot dimensions +are known. The **auto** flag is supported for the following parameters: + +================================== =============================================== +:term:`FONT_ANNOT_PRIMARY` Primary annotation font [11.00p] +:term:`FONT_ANNOT_SECONDARY` Secondary annotation font [13.20p] +:term:`FONT_HEADING` Subplot heading font [30.80p] +:term:`FONT_LABEL` Axis label font [15.40p] +:term:`FONT_LOGO` Logo font [8.80p] +:term:`FONT_SUBTITLE` Plot subtitle font [19.80p] +:term:`FONT_TAG` Tag/labeling font [17.60p] +:term:`FONT_TITLE` Plot title font [24.20p] +:term:`MAP_ANNOT_MIN_SPACING` Minimum space between annotations [11.00p] +:term:`MAP_ANNOT_OFFSET_PRIMARY` Primary annotation offset from axis [3.30p] +:term:`MAP_ANNOT_OFFSET_SECONDARY` Secondary annotation offset from axis [3.30p] +:term:`MAP_FRAME_AXES` Axes that are drawn and annotated +:term:`MAP_FRAME_PEN` Pen width of plain frame [1.65p] +:term:`MAP_FRAME_WIDTH` Width of fancy frame [3.30p] +:term:`MAP_GRID_PEN_PRIMARY` Pen width of primary gridline [0.28p] +:term:`MAP_GRID_PEN_SECONDARY` Pen width of secondary gridline [0.55p] +:term:`MAP_HEADING_OFFSET` Heading offset from subplot [17.60p] +:term:`MAP_LABEL_OFFSET` Label offset from annotations [6.60p] +:term:`MAP_POLAR_CAP` Appearance of gridlines near the poles +:term:`MAP_TICK_LENGTH_PRIMARY` Length of primary tick marks [2.2p/1.1p] +:term:`MAP_TICK_LENGTH_SECONDARY` Length of secondary tick marks [6.60p/1.65p] +:term:`MAP_TICK_PEN_PRIMARY` Pen width of primary tick marks [0.55p] +:term:`MAP_TICK_PEN_SECONDARY` Pen width of secondary tick marks [0.28p] +:term:`MAP_TITLE_OFFSET` Title offset from plot [13.20p] +================================== =============================================== + +The reference dimensions listed in brackets are the values for a plot +with a height and width of 25 cm. Larger and smaller illustrations +will see a linear magnification or attenuation of these dimensions. The primary +annotation font size will be computed as:: + + size = (2/15) * (map_size_in_cm - 10) + 9 [in points] + +where :math:`map\_size\_in\_cm = sqrt(map\_height x map\_width)`. All other +items will have their reference sizes scaled by :math:`scale = size / 10`. In +modern mode, if you do nothing then all of the above dimensions will be +automatically set based on your plot dimensions. However, you are free to +override any of them using the methods described in the next section. **Note**: +Selecting **auto** for font sizes and dimensions requires GMT to know the plot +dimensions. If the plot dimensions are not available (e.g., :doc:`/pslegend` +with **-Dx** and no **-R -J**), the settings will be updated using the nominal +font sizes and dimensions for a 10 x 1 cm plot. **Note**: The particular scaling +relationship is experimental in 6.2 and we reserve the right to adjust it +pending further experimentation and user feedback. + +For **MAP_POLAR_CAP**, **auto** will determine a suitable *pc_lat* for your +region for all azimuthal projections and a few others in which the geographic +poles are plotted as points (Lambert Conic, Oblique Mercator, Hammer, Mollweide, +Sinusoidal, and van der Grinten). + +For **MAP_FRAME_AXES**, **auto** will determine a suitable setting based on the +projection, type of plot, perspective, etc. For example, GMT will determine the +position of different quadrants for perspective and polar plots and select the +equivalent of **WrStZ**. The default for non-perspective, non-polar plots using +**MAP_FRAME_AXES**\ =\ **auto** is **WrStZ**. + Changing GMT defaults ~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/rst/source/gmt.conf.rst b/doc/rst/source/gmt.conf.rst index c369fd7e43d..19256524a2e 100644 --- a/doc/rst/source/gmt.conf.rst +++ b/doc/rst/source/gmt.conf.rst @@ -11,20 +11,22 @@ Description The following is a list of the parameters that are user-definable in GMT. The parameter names are always given in **UPPER CASE**. The -parameter values are case-insensitive unless otherwise noted. The system -defaults are given in brackets [default is **value**], with units specified for dimensional -quantities. Most parameters can be changed by using :doc:`gmtset`, editing a -**gmt.conf** file that can be acquired using :doc:`gmtdefaults`, or setting -parameters on-the-fly via the **--PARAMETER**\ =\ *VALUE* option to any GMT -program. However, a few are static and are only read via the **gmt.conf** file; -these are labeled (*static*). Several parameters take only **true** or **false**. -It is recommended that users specify the units for distances and lengths by -appending **c** (cm), **i** (inch), or **p** (points) when changing parameters -using any of these methods. By default, when no unit is specified the value will -be assumed to be cm for parameters not related to fonts or pen thicknesses and -will be assumed to be points for parameters related to fonts or pen thicknesses. -The interpretation of unitless dimensional quantities can be changed using the -parameter :term:`PROJ_LENGTH_UNIT` or specifying US units when building GMT. +parameter values are case-insensitive unless otherwise noted. Theme-independent +system defaults are given in brackets [default is **value**], with units +specified for dimensional quantities, while theme-dependent defaults are +outlined in the **GMT_THEME** :doc:`settings table `. Most parameters +can be changed by using :doc:`gmtset`, editing a **gmt.conf** file that can be +acquired using :doc:`gmtdefaults`, or setting parameters on-the-fly via the +**--PARAMETER**\ =\ *VALUE* option to any GMT program. However, a few are static +and are only read via the **gmt.conf** file; these are labeled (*static*). +Several parameters take only **true** or **false**. It is recommended that users +specify the units for distances and lengths by appending **c** (cm), +**i** (inch), or **p** (points) when changing parameters using any of these +methods. By default, when no unit is specified the value will be assumed to be +cm for parameters not related to fonts or pen thicknesses and will be assumed to +be points for parameters related to fonts or pen thicknesses. The interpretation +of unitless dimensional quantities can be changed using the parameter +:term:`PROJ_LENGTH_UNIT` or specifying US units when building GMT. Common Specifications --------------------- @@ -67,33 +69,39 @@ COLOR Parameters Default CPT table when none is selected [default is **turbo**]. **COLOR_HSV_MAX_S** - Maximum saturation (0-1) assigned for most positive intensity value [default is **0.1**]. + Maximum saturation (0-1) assigned for most positive intensity value + [default is **0.1**]. **COLOR_HSV_MIN_S** - Minimum saturation (0-1) assigned for most negative intensity value [default is **1.0**]. + Minimum saturation (0-1) assigned for most negative intensity value + [default is **1.0**]. **COLOR_HSV_MAX_V** - Maximum value (0-1) assigned for most positive intensity value [default is **1.0**]. + Maximum value (0-1) assigned for most positive intensity value + [default is **1.0**]. **COLOR_HSV_MIN_V** - Minimum value (0-1) assigned for most negative intensity value [default is **0.3**]. + Minimum value (0-1) assigned for most negative intensity value + [default is **0.3**]. **COLOR_MODEL** Selects in which color space a CPT should be interpolated. By default, color interpolation takes place directly on the RGB values which can produce some unexpected hues, whereas interpolation directly on the HSV values better preserves those hues. The choices - are: **none** (default: use whatever the **COLOR_MODEL** setting in the + are: **none** (use whatever the **COLOR_MODEL** setting in the CPT demands), **rgb** (force interpolation in RGB), **hsv** (force interpolation in HSV), **cmyk** (assumes colors are in CMYK but interpolates in RGB) [default is **none**]. **COLOR_NAN** - Color used for the non-defined areas of images (i.e., where z = NaN) [default is **128**]. + Color used for the non-defined areas of images (i.e., where z = NaN) + [default is **128**]. **COLOR_SET** - Default comma-separated list of colors (or a *categorical* CPT name) for automatic, - sequential color assignments [default is **#0072BD,#D95319,#EDB120,#7E2F8E,#77AC30,#4DBEEE,#A2142F**]. + Default comma-separated list of colors (or a *categorical* CPT name) for + automatic, sequential color assignments + [default is **#0072BD,#D95319,#EDB120,#7E2F8E,#77AC30,#4DBEEE,#A2142F**]. .. _DIR Parameters: @@ -103,11 +111,12 @@ DIR Parameters .. glossary:: **DIR_CACHE** - Cache directory where we save remote filenames starting in **@** (e.g., @hotspots.txt) [default is **~/.gmt/cache**]. + Cache directory where we save remote filenames starting in **@** + (e.g., @hotspots.txt) [default is **~/.gmt/cache**]. **DIR_DATA** - Session data directory. Overrides the value of the environment variable **$GMT_DATADIR** - (see :ref:`Directory parameters` in the CookBook). + Session data directory. Overrides the value of the environment variable + **$GMT_DATADIR** (see :ref:`Directory parameters` in the CookBook). **DIR_DCW** Path to optional Digital Chart of the World polygon files. @@ -123,41 +132,53 @@ FONT Parameters .. glossary:: **FONT** - Sets the default for all fonts, except :term:`FONT_LOGO`. This setting is - not included in the **gmt.conf** file. + Sets the default for all fonts, except :term:`FONT_LOGO`. This setting + is not included in the **gmt.conf** file. **FONT_ANNOT** - Sets both :term:`FONT_ANNOT_PRIMARY` and :term:`FONT_ANNOT_SECONDARY` to the value specified. - This setting is not included in the **gmt.conf** file. + Sets both :term:`FONT_ANNOT_PRIMARY` and :term:`FONT_ANNOT_SECONDARY` to + the value specified. This setting is not included in the **gmt.conf** file. **FONT_ANNOT_PRIMARY** - Font used for primary annotations, etc. [default is **12p,Helvetica,black**]. When - **+** is prepended, scale fonts, offsets and tick-lengths relative - to :term:`FONT_ANNOT_PRIMARY`. + Font used for primary annotations, etc [default is :doc:`theme dependent + `]. When **+** is prepended, scale fonts, offsets and + tick-lengths relative to :term:`FONT_ANNOT_PRIMARY`. Choose **auto** for + :ref:`automatic scaling with plot size `. **FONT_ANNOT_SECONDARY** - Font to use for time axis secondary annotations - [default is **14p,Helvetica,black**]. + Font to use for time axis secondary annotations [default is + :doc:`theme dependent `] Choose **auto** for + :ref:`automatic scaling with plot size `. **FONT_HEADING** - Font to use when plotting headings above subplots [default is **32p,Helvetica,black**]. + Font to use when plotting headings above subplots [default is + :doc:`theme dependent `]. Choose **auto** for + :ref:`automatic scaling with plot size `. **FONT_LABEL** - Font to use when plotting labels below axes [default is **16p,Helvetica,black**]. + Font to use when plotting labels below axes [default is :doc:`theme dependent + `]. Choose **auto** for :ref:`automatic scaling with plot + size `. **FONT_LOGO** - Font to use for text plotted as part of the GMT time logo - [default is **8p,Helvetica,black**]. + Font to use for text plotted as part of the GMT time logo [:doc:`theme + dependent `]. Choose **auto** for :ref:`automatic scaling + with plot size `. **FONT_SUBTITLE** - Font to use when plotting titles over graphs that involve a subtitle [default is **18p,Helvetica,black**]. + Font to use when plotting titles over graphs that involve a subtitle + [default is :doc:`theme dependent `]. Choose **auto** for + :ref:`automatic scaling with plot size `. **FONT_TAG** Font to use for subplot panel tags such as a), ii) - [default is **20p,Helvetica,black**]. + [default is :doc:`theme dependent `]. Choose **auto** + for :ref:`automatic scaling with plot size `. **FONT_TITLE** - Font to use when plotting titles over graphs [default is **24p,Helvetica,black**]. + Font to use when plotting titles over graphs [default is :doc:`theme dependent + `]. Choose **auto** for :ref:`automatic scaling with plot + size `. .. _FORMAT Parameters: @@ -186,15 +207,15 @@ FORMAT Parameters smallest unit (e.g., seconds), append **.xxx**, where the number of x indicates the desired precision. If no floating point is indicated then the smallest specified unit will be rounded off to nearest - integer. For 12-hour clocks, append **am**, **AM**, **a.m.**, or **A.M.** (GMT - will replace a\|A with p\|P for pm). If your template starts with a + integer. For 12-hour clocks, append **am**, **AM**, **a.m.**, or **A.M.** + (GMT will replace a\|A with p\|P for pm). If your template starts with a leading hyphen (**-**) then each integer item (y,m,d) will be printed without leading zeros (default uses fixed width formats). As examples, try hh:mm, hh.mm.ss, hh:mm:ss.xxxx, hha.m., etc. - [default is **hh:mm:ss**]. If the format is simply **-** then no clock is output and - the ISO T divider between date and clock is omitted. **Note**: When - high-precision time-series are written to ASCII output the default - format may not be adequate. Many modules automatically handle + [default is **hh:mm:ss**]. If the format is simply **-** then no clock + is output and the ISO T divider between date and clock is omitted. + **Note**: When high-precision time-series are written to ASCII output + the default format may not be adequate. Many modules automatically handle this by extending the format, but you should be alert of unusual situations where data may appear truncated to nearest second. @@ -204,10 +225,10 @@ FORMAT Parameters strings in data fields. You may specify either Gregorian calendar format or ISO week calendar format. Gregorian calendar: Use any combination of **yyyy** (or **yy** for 2-digit years; if so see - :term:`TIME_Y2K_OFFSET_YEAR`), **mm** (or **o** for abbreviated month name in - the current time language), and **dd**, with or without delimiters. For - day-of-year data, use **jjj** instead of **mm** and/or **dd**. Examples can be - ddmmyyyy, yy-mm-dd, dd-o-yyyy, yyyy/dd/mm, yyyy-jjj, etc. ISO + :term:`TIME_Y2K_OFFSET_YEAR`), **mm** (or **o** for abbreviated month + name in the current time language), and **dd**, with or without delimiters. + For day-of-year data, use **jjj** instead of **mm** and/or **dd**. Examples + can be ddmmyyyy, yy-mm-dd, dd-o-yyyy, yyyy/dd/mm, yyyy-jjj, etc. ISO Calendar: Expected template is **yyyy[-]W[-]ww[-]d**, where ww is ISO week and d is ISO week day. Either template must be consistent, e.g., you cannot specify months if you do not specify years. @@ -229,8 +250,8 @@ FORMAT Parameters date strings in data fields. You may specify either Gregorian calendar format or ISO week calendar format. Gregorian calendar: Use any combination of **yyyy** (or **yy** for 2-digit years; if so see - :term:`TIME_Y2K_OFFSET_YEAR`), **mm** (or **o** for abbreviated month name in - the current time language), and **dd**, with or without delimiters. For + :term:`TIME_Y2K_OFFSET_YEAR`), **mm** (or **o** for abbreviated month name + in the current time language), and **dd**, with or without delimiters. For day-of-year data, use **jjj** instead of mm and/or dd. As examples, try yy/mm/dd, yyyy=jjj, dd-o-yyyy, dd-mm-yy, yy-mm, etc. ISO Calendar: Expected template is **yyyy[-]W[-]ww[-]d**, where ww is ISO week and d @@ -238,8 +259,8 @@ FORMAT Parameters cannot specify months if you do not specify years. As examples, try yyyyWww, yy-W-ww-d, etc. If your template starts with a leading hyphen (**-**) then each integer item (y,m,d) will be printed without - leading zeros (default uses fixed width formats) [default is **yyyy-mm-dd**]. If - the format is simply **-** then no date is output and the ISO T divider + leading zeros (default uses fixed width formats) [default is **yyyy-mm-dd**]. + If the format is simply **-** then no date is output and the ISO T divider between date and clock is omitted. **FORMAT_GEO_MAP** @@ -247,8 +268,9 @@ FORMAT Parameters coordinate is to be plotted. This template is then used to guide the plotting of geographical coordinates in data fields. See :term:`FORMAT_GEO_OUT` for details. In addition, you can append **A** - which plots the absolute value of the coordinate [default is **ddd:mm:ss**]. - Not all items may be plotted as this depends on the annotation interval. + which plots the absolute value of the coordinate. Not all items may be + plotted as this depends on the annotation interval. [default is + :doc:`theme dependent `]. **FORMAT_GEO_OUT** Formatting template that indicates how an output geographical @@ -281,8 +303,8 @@ FORMAT Parameters **FORMAT_FLOAT_OUT** Format (C language printf syntax) to be used when printing double precision floating point numbers to output files. For geographic - coordinates, see :term:`FORMAT_GEO_OUT`. [default is **%.12g**]. To give some - columns a separate format, supply one or more comma-separated + coordinates, see :term:`FORMAT_GEO_OUT`. [default is **%.12g**]. To give + some columns a separate format, supply one or more comma-separated *cols*:*format* specifications, where *cols* can be specific columns (e.g., 5 for 6th since 0 is the first) or a range of columns (e.g., 3-7). The last specification without column information will @@ -291,8 +313,8 @@ FORMAT Parameters columns. **FORMAT_TIME_MAP** - Sets both :term:`FORMAT_TIME_PRIMARY_MAP` and :term:`FORMAT_TIME_SECONDARY_MAP` to the value specified. - This setting is not included in the **gmt.conf** file. + Sets both :term:`FORMAT_TIME_PRIMARY_MAP` and :term:`FORMAT_TIME_SECONDARY_MAP` + to the value specified. This setting is not included in the **gmt.conf** file. **FORMAT_TIME_PRIMARY_MAP** Controls how primary month-, week-, and weekday-names are formatted. @@ -304,7 +326,8 @@ FORMAT Parameters Controls how secondary month-, week-, and weekday-names are formatted. Choose among **full**, **abbreviated**, and **character**. If the leading **f**, **a**, or **c** are replaced - with **F**, **A**, and **C** the entire annotation will be in upper case [default is **full**]. + with **F**, **A**, and **C** the entire annotation will be in upper case + [default is **full**]. **FORMAT_TIME_STAMP** Defines the format of the time information in the UNIX time stamp. @@ -322,50 +345,50 @@ GMT Miscellaneous Parameters **GMT_COMPATIBILITY** Determines if the current GMT version should be able to parse command-line options for a prior major release. Specify the major release version number, - e.g., 4-6. If 4 is set we will parse obsolete GMT 4 options and issue warnings; if 5 - is set then parsing GMT 4 only syntax will result in errors [4]; likewise - for 6: obsolete syntax from early GMT 5 will be considered errors. + e.g., 4-6. If 4 is set we will parse obsolete GMT 4 options and issue warnings; + if 5 is set then parsing GMT 4 only syntax will result in errors [default is 4]; + likewise for 6: obsolete syntax from early GMT 5 will be considered errors. **GMT_DATA_SERVER** - Name (or URL) of a GMT data server [**oceania**]. Please set to the - data server closest to your location for faster data download. See + Name (or URL) of a GMT data server [default is **oceania**]. Please set + to the data server closest to your location for faster data download. See `Data Server Mirrors `_ for a list of the currently available mirrors. **GMT_DATA_SERVER_LIMIT** - Upper limit on the size of remote file to download [default is **unlimited**]. Give - the maximum file size in bytes, or append **k**, **m**, or **g** for kilo-, mega-, - or giga-bytes. + Upper limit on the size of remote file to download [default is **unlimited**]. + Give the maximum file size in bytes, or append **k**, **m**, or **g** for + kilo-, mega-, or giga-bytes. **GMT_DATA_UPDATE_INTERVAL** Specifies how often we update the local catalog of data available on - the remote server and pruning expired data sets [default is **1d**]. Allowable time - units are **d** (days), **w** (week), **o** (month, here 30 days). - To turn off periodic updates entirely, specify interval as **off**, **never**, - **infinity**, or just **0**. + the remote server and pruning expired data sets [default is **1d**]. + Allowable time units are **d** (days), **w** (week), **o** (month, + here 30 days). To turn off periodic updates entirely, specify interval + as **off**, **never**, **infinity**, or just **0**. **GMT_EXPORT_TYPE** - This setting is only used by external interfaces and controls the - data type used for table entries. Choose from **double**, - **single**, **[u]long**, **[u]int**, **[u]short**, and **[u]char** [default is **double**]. + This setting is only used by external interfaces and controls the data + type used for table entries. Choose from **double**, **single**, + **[u]long**, **[u]int**, **[u]short**, and **[u]char** [default is **double**]. **GMT_EXTRAPOLATE_VAL** - Determines what to do if extrapolating beyond the data domain. - Choose among **NaN**, **extrap** or **extrapval**,\ *value*. In - the first case return NaN for any element of x that is outside range. - Second case lets the selected algorithm compute the - extrapolation values. Third case sets the extrapolation values to - the constant value passed in *value* (this value must off course be - numeric) [default is **NaN**]. + Determines what to do if extrapolating beyond the data domain. Choose + among **NaN**, **extrap** or **extrapval**,\ *value*. In the first case + return NaN for any element of x that is outside range. Second case lets + the selected algorithm compute the extrapolation values. Third case sets + the extrapolation values to the constant value passed in *value* (this + value must off course be numeric) [default is **NaN**]. **GMT_CUSTOM_LIBS** Comma-separated list of GMT-compliant shared libraries that extend - the capability of GMT with additional custom modules [default is **none**]. Alternatively, - provide a directory name, that MUST end with a slash (or back slash), - to use all shared libraries in that directory. On Windows, if the dir - name is made up only of a single slash ('/') search inside a subdirectory - called **gmt_plugins** of the directory that contains the **gmt** executable. - See the API documentation for how to build your own shared modules. + the capability of GMT with additional custom modules [default is **none**]. + Alternatively, provide a directory name, that MUST end with a slash (or + back slash), to use all shared libraries in that directory. On Windows, + if the dir name is made up only of a single slash ('/') search inside a + subdirectory called **gmt_plugins** of the directory that contains the + **gmt** executable. See the API documentation for how to build your own + shared modules. **GMT_FFT** Determines which Fast Fourier Transform (FFT) should be used among @@ -383,8 +406,8 @@ GMT Miscellaneous Parameters **$GMT_USERDIR** is not writable, in the current directory. To use this feature append *planner_flag*, which can be one of *measure*, *patient*, *exhaustive* and *estimate* which pick a (probably - sub-optimal) plan quickly [default is *estimate*]. See FFTW reference for details. - **Note**: If you need a single transform of a + sub-optimal) plan quickly [default is *estimate*]. See FFTW reference for + details. **Note**: If you need a single transform of a given size only, the one-time cost of the smart planner becomes significant. In that case, stick to the default planner, *estimate*, based on heuristics. @@ -450,6 +473,15 @@ GMT Miscellaneous Parameters Sets the upper limit on the number of cores any multi-threaded module might use (whether **-x** is selected or not) [default is **0** (i.e., unlimited)]. + **GMT_THEME** + Override GMT default settings with those of the selected theme. Choose from + *classic* [Default for classic mode], *modern* [Default for modern mode], + and *minimal*. You can also create and use your own themes by compiling + files of desired settings and place them in your GMT user themes directory + (usually ~/.gmt/themes) and name them *theme*.conf. See the + :doc:`theme settings table` for parameters associated with + each theme. + **GMT_TRIANGULATE** Determines if we use the **Watson** or **Shewchuk** algorithm (if configured during installation) for triangulation. @@ -483,36 +515,40 @@ I/O Parameters **IO_GRIDFILE_FORMAT** Default file format for grids, with optional scale, offset and - invalid value, written as *ff*\ [**+s**\ *scale*][**+o**\ *offset*][**+n**\ *invalid*]. The - 2-letter format indicator can be one of [**abcegnrs**][**bsifd**]. See - :doc:`grdconvert` and Section :ref:`grid-file-format` of the - GMT Technical Reference and Cookbook for more information. - You may the scale as **a** for auto-adjusting the scale and/or offset of - packed integer grids (=\ *ID*\ **+s**\ *a* is a shorthand for - =\ *ID*\ **+s**\ *a*\ **+o**\ *a*). When *invalid* is omitted - the appropriate value for the given format is used (NaN or largest negative). [default is **nf**]. + invalid value, written as *ff*\ [**+s**\ *scale*][**+o**\ *offset*][**+n**\ *invalid*]. + The 2-letter format indicator can be one of [**abcegnrs**][**bsifd**]. See + :doc:`grdconvert` and Section :ref:`grid-file-format` of the GMT Technical + Reference and Cookbook for more information. You may the scale as **a** + for auto-adjusting the scale and/or offset of packed integer grids + (=\ *ID*\ **+s**\ *a* is a shorthand for =\ *ID*\ **+s**\ *a*\ **+o**\ *a*). + When *invalid* is omitted the appropriate value for the given format is used + (NaN or largest negative) [default is **nf**]. **IO_GRIDFILE_SHORTHAND** If **true**, all grid file names are examined to see if they use the - file extension shorthand discussed in Section :ref:`grid-file-format` of the GMT - Technical Reference and Cookbook. If **false**, no filename expansion is done [default is **false**]. + file extension shorthand discussed in Section :ref:`grid-file-format` of + the GMT Technical Reference and Cookbook. If **false**, no filename + expansion is done [default is **false**]. **IO_HEADER** - (**-h**) Specifies whether input/output ASCII files have header record(s) or not [default is **false**]. + (**-h**) Specifies whether input/output ASCII files have header record(s) + or not [default is **false**]. **IO_HEADER_MARKER** Give a string from which any character will indicate a header record in - an incoming ASCII data table if found in the first position [default is **#%!;"'**]. If another marker - should be used for output than the first character in the list, then append a single - character for the output header record marker. The two sets must be separated by a comma. - **Note**: A maximum of 7 input markers can be specified. + an incoming ASCII data table if found in the first position [default is **#%!;"'**]. + If another marker should be used for output than the first character in + the list, then append a single character for the output header record + marker. The two sets must be separated by a comma. **Note**: A maximum + of 7 input markers can be specified. **IO_LONLAT_TOGGLE** (**-:**) Set if the first two columns of input and output files contain (latitude,longitude) or (y,x) rather than the expected (longitude,latitude) or (x,y). false means we have (x,y) both on input and output. **true** means both input and output should be (y,x). - **IN** means only input has (y,x), while **OUT** means only output should be (y,x). [default is **false**]. + **IN** means only input has (y,x), while **OUT** means only output should + be (y,x) [default is **false**]. **IO_N_HEADER_RECS** Specifies how many header records to expect if **-h** is used [default is **0**]. @@ -525,10 +561,10 @@ I/O Parameters Determines what happens when input records containing NaNs for *x* or *y* (and in some cases *z*) are read. This may happen, for instance, when there is text or other junk present instead of data coordinates, and - the conversion to a data value fails and yields a NaN. Choose between **skip**, - which will report how many bad records were skipped, and **pass**, - which will quietly pass these records on to the calling - programs [default is **pass**]. For most programs this will result in output records with + the conversion to a data value fails and yields a NaN. Choose between + **skip**, which will report how many bad records were skipped, and **pass**, + which will quietly pass these records on to the calling programs [default + is **pass**]. For most programs this will result in output records with NaNs as well, but some will interpret these NaN records to indicate gaps in a series; programs may then use that information to detect segmentation (if applicable). @@ -545,7 +581,7 @@ I/O Parameters [128,256). Setting :term:`IO_NC4_CHUNK_SIZE` will produce netCDF version 4 files, which can only be read with the netCDF 4 library, unless all dimensions are less than 128 or **c**\ lassic is specified for - classic netCDF. [default is **auto**] + classic netCDF [default is **auto**] **IO_NC4_DEFLATION_LEVEL** Sets the compression level for netCDF4 files upon output. Values @@ -554,19 +590,19 @@ I/O Parameters improve performance and reduce the size of certain data. While higher compression levels further reduce the data size, they do so at the cost of extra processing time. This parameter does not - apply to classic netCDF files. [default is **3**] + apply to classic netCDF files [default is **3**]. **IO_SEGMENT_BINARY** Determines how binary data records with all values set to NaN are interpreted. Such records are considered to be encoded segment headers in binary files provided the number of columns equals or - exceeds the current setting of IO_SEGMENT_BINARY [default is **2**]. Specify **0** - or **off** to deactivate the segment header determination. + exceeds the current setting of IO_SEGMENT_BINARY [default is **2**]. + Specify **0** or **off** to deactivate the segment header determination. **IO_SEGMENT_MARKER** This holds the character we expect to indicate a segment header in - an incoming ASCII data or text table [default is **>**]. If this marker should be - different for output then append another character for the output + an incoming ASCII data or text table [default is **>**]. If this marker + should be different for output then append another character for the output segment marker. The two characters must be separated by a **comma**. Two marker characters have special meaning: **B** means "blank line" and will treat blank lines as initiating a new segment, whereas **N** means @@ -587,45 +623,52 @@ MAP Parameters **MAP_ANNOT_MIN_ANGLE** If the angle between the map boundary and the annotation baseline is less than this minimum value (in degrees), the annotation is not - plotted (this may occur for certain oblique projections.) Give a + plotted (this may occur for certain oblique projections). Give a value in the range [0,90] [default is **20**]. **MAP_ANNOT_MIN_SPACING** If an annotation would be plotted less than this minimum distance from its closest neighbor, the annotation is not plotted (this may - occur for certain oblique projections.) [default is **0p**] + occur for certain oblique or polar projections) [default is + :doc:`theme dependent `]. Choose **auto** for + :ref:`automatic scaling with plot size `. **MAP_ANNOT_OBLIQUE** This argument is a comma-separated list of up to seven keywords: **separate** means longitudes will be annotated on the lower and upper boundaries only, and latitudes will be annotated on the left and right - boundaries only; - **anywhere** means annotations will occur wherever an imaginary gridline - crosses the map boundaries; **lon_horizontal** means longitude annotations - will be plotted horizontally; **lat_horizontal** means latitude annotations - will be plotted horizontally; **tick_extend** means tick-marks are extended - so the distance from the tip of the oblique tick to the map frame equals - the specified tick length; **tick_normal** means tick-marks will be drawn - normal to the border regardless of gridline angle; **lat_parallel** means - latitude annotations will be plotted parallel to the border. [default is **anywhere**]. + boundaries only; **anywhere** means annotations will occur wherever an + imaginary gridline crosses the map boundaries; **lon_horizontal** means + longitude annotations will be plotted horizontally; **lat_horizontal** + means latitude annotations will be plotted horizontally; **tick_extend** + means tick-marks are extended so the distance from the tip of the oblique + tick to the map frame equals the specified tick length; **tick_normal** + means tick-marks will be drawn normal to the border regardless of + gridline angle; **lat_parallel** means latitude annotations will be + plotted parallel to the border [default is **anywhere**]. **MAP_ANNOT_OFFSET** - Sets both :term:`MAP_ANNOT_OFFSET_PRIMARY` and :term:`MAP_ANNOT_OFFSET_SECONDARY` to the value specified. + Sets both :term:`MAP_ANNOT_OFFSET_PRIMARY` and + :term:`MAP_ANNOT_OFFSET_SECONDARY` to the value specified. This setting is not included in the **gmt.conf** file. **MAP_ANNOT_OFFSET_PRIMARY** - Distance from end of tick-mark to start of annotation [default is **5p**]. + Distance from end of tick-mark to start of annotation [default is + :doc:`theme dependent `]. Choose **auto** for + :ref:`automatic scaling with plot size `. **MAP_ANNOT_OFFSET_SECONDARY** Distance from base of primary annotation to the top of the secondary - annotation [default is **5p**] (Only applies to time axes with both primary and - secondary annotations). + annotation (Only applies to time axes with both primary and secondary + annotations) [default is :doc:`theme dependent `]. Choose + **auto** for :ref:`automatic scaling with plot size `. **MAP_ANNOT_ORTHO** Determines which axes will get their annotations (for Cartesian - projections) plotted orthogonally to the axes. Combine any **w**, - **e**, **s**, **n**, **z** (uppercase allowed as well). [default is **we**] (if nothing specified). - Note that this setting can be overridden via the **+a** modifier in **-B**. + projections) plotted orthogonally to the axes. Combine any **w**, **e**, + **s**, **n**, **z** (uppercase allowed as well) [default is **we**] (if + nothing specified). Note that this setting can be overridden via the + **+a** modifier in **-B**. **MAP_DEFAULT_PEN** Sets the default of all pens related to **-W** options. Prepend @@ -636,8 +679,8 @@ MAP Parameters [default is **0.25p,black**]. **MAP_DEGREE_SYMBOL** - Determines what symbol is used to plot the degree symbol on - geographic map annotations. Choose between **ring**, **degree**, **colon**, or + Determines what symbol is used to plot the degree symbol on geographic + map annotations. Choose between **ring**, **degree**, **colon**, or **none** [default is **degree**]. **MAP_FRAME_AXES** @@ -647,10 +690,14 @@ MAP Parameters to draw the axis only, but not annotate. To *just* draw an axis without annotation and ticks you can use the **l**\ (eft), **r**\ (ight), **b**\ (ottom), **t**\ (op) and (for 3-D) **u**\ (p) codes. Add an - optional **+b** to draw a cube of axes in perspective view. [default is **WESNZ**]. + optional **+b** to draw a cube of axes in perspective view. Choose + **auto** for :ref:`automatic selection ` [default is + :doc:`theme dependent `]. **MAP_FRAME_PEN** - Pen attributes used to draw plain map frame [default is **thicker,black**]. + Pen attributes used to draw plain map frame [default is :doc:`theme dependent + `]. Choose **auto** for :ref:`automatic scaling with plot size + `. **MAP_FRAME_PERCENT** Percentage of the fancy frame width to use for the internal checkerboard @@ -659,23 +706,23 @@ MAP Parameters **MAP_FRAME_TYPE** Choose between **inside**, **plain** and **fancy** (thick boundary, alternating black/white frame; append **-rounded** for rounded corners) - [default is **fancy**]. For some map projections (e.g., Oblique Mercator), plain is - the only option even if fancy is set as default. In general, fancy - only applies to situations where the projected x and y directions - parallel the longitude and latitude directions (e.g., rectangular - projections, polar projections). For situations where all boundary - ticks and annotations must be inside the maps (e.g., for preparing - geotiffs), chose **inside**. Finally, for Cartesian plots you can - also choose **graph**\ , which adds a vector to the end of each axis. - This works best when you reduce the number of axes plotted to one - per dimension. By default, the vector tip extends the length of each axis by 7.5%. - Alternatively, append ,\ *length*, where the optional *unit* - may be **%** (then *length* is the alternate extension in percent) or one - of **c**, **i**, or **p** (then *length* is the absolute extension - of the axis to the start of the vector base instead). The vector stem - is set to match :term:`MAP_FRAME_WIDTH`, while the vector - head length and width are 10 and 5 times this width, respectively. You - may control its shape via :term:`MAP_VECTOR_SHAPE`. + [default is :doc:`theme dependent `]. For some map + projections (e.g., Oblique Mercator), plain is the only option even if + fancy is set as default. In general, fancy only applies to situations + where the projected x and y directions parallel the longitude and + latitude directions (e.g., rectangular projections, polar projections). + For situations where all boundary ticks and annotations must be inside + the maps (e.g., for preparing geotiffs), chose **inside**. Finally, + for Cartesian plots you can also choose **graph**\ , which adds a vector + to the end of each axis. This works best when you reduce the number of + axes plotted to one per dimension. By default, the vector tip extends + the length of each axis by 7.5%. Alternatively, append ,\ *length*, + where the optional *unit* may be **%** (then *length* is the alternate + extension in percent) or one of **c**, **i**, or **p** (then *length* + is the absolute extension of the axis to the start of the vector base + instead). The vector stem is set to match :term:`MAP_FRAME_WIDTH`, while + the vector head length and width are 10 and 5 times this width, + respectively. You may control its shape via :term:`MAP_VECTOR_SHAPE`. .. toggle:: @@ -690,13 +737,14 @@ MAP Parameters Appearance of different **MAP_FRAME_TYPE** settings **MAP_FRAME_WIDTH** - Width (> 0) of map borders for fancy map frame [default is **5p**]. **Note**: For fancy - frames, :term:`MAP_FRAME_PEN` is automatically set to 0.1 times the - :term:`MAP_FRAME_WIDTH` setting. + Width (> 0) of map borders for fancy map frame [default is :doc:`theme dependent + `]. **Note**: For fancy frames, :term:`MAP_FRAME_PEN` + is automatically set to 0.1 times the :term:`MAP_FRAME_WIDTH` setting. + Choose **auto** for :ref:`automatic scaling with plot size `. **MAP_GRID_CROSS_SIZE** - Sets both :term:`MAP_GRID_CROSS_SIZE_PRIMARY` and :term:`MAP_GRID_CROSS_SIZE_SECONDARY` to the value specified. - This setting is not included in the **gmt.conf** file. + Sets both :term:`MAP_GRID_CROSS_SIZE_PRIMARY` and :term:`MAP_GRID_CROSS_SIZE_SECONDARY` + to the value specified. This setting is not included in the **gmt.conf** file. **MAP_GRID_CROSS_SIZE_PRIMARY** Size of grid cross at lon-lat intersections. **0** means draw @@ -720,17 +768,23 @@ MAP Parameters **MAP_GRID_PEN_PRIMARY** Pen attributes used to draw primary grid lines in dpi units or - points (append **p**) [default is **0.25p,black**]. + points (append **p**) [default is :doc:`theme dependent `]. + Choose **auto** for :ref:`automatic scaling with plot size `. **MAP_GRID_PEN_SECONDARY** Pen attributes used to draw secondary grid lines in dpi units or - points (append **p**) [default is **thinner,black**]. + points (append **p**) [default is :doc:`theme dependent `]. + Choose **auto** for :ref:`automatic scaling with plot size `. **MAP_HEADING_OFFSET** - Distance from top of subplot panel titles to the base of the heading [default is **18p**]. + Distance from top of subplot panel titles to the base of the heading + [default is :doc:`theme dependent `]. Choose **auto** for + :ref:`automatic scaling with plot size `. **MAP_LABEL_OFFSET** - Distance from base of axis annotations to the top of the axis label [default is **8p**]. + Distance from base of axis annotations to the top of the axis label + [default is :doc:`theme dependent `]. Choose **auto** + for :ref:`automatic scaling with plot size `. **MAP_LINE_STEP** Determines the maximum length (> 0) of individual straight @@ -757,55 +811,63 @@ MAP Parameters Controls the appearance of gridlines near the poles for all azimuthal projections and a few others in which the geographic poles are plotted as points (Lambert Conic, Oblique Mercator, Hammer, Mollweide, - Sinusoidal and van der Grinten). Specify either **none** (in which case there - is no special handling) or *pc_lat*/*pc_dlon*. In that case, normal - gridlines are only drawn between the latitudes - -*pc_lat*/+\ *pc_lat*, and above those latitudes the gridlines are - spaced at the (presumably coarser) *pc_dlon* interval; the two - domains are separated by a small circle drawn at the *pc_lat* - latitude [default is **85/90**]. Note for r-theta (polar) projection where r = 0 is - at the center of the plot the meaning of the cap is reversed, i.e., - the default 85/90 will draw a r = 5 radius circle at the center of - the map with less frequent radial lines there. + Sinusoidal and van der Grinten). Specify either **none** (in which case + there is no special handling) or *pc_lat*/*pc_dlon*. In that case, normal + gridlines are only drawn between the latitudes -*pc_lat*/+\ *pc_lat*, and + above those latitudes the gridlines are spaced at the (presumably coarser) + *pc_dlon* interval; the two domains are separated by a small circle drawn + at the *pc_lat* latitude. Alternatively, give **auto** to determine a + *pc_lat* suitable for your region [default is + :doc:`theme dependent `]. Note for r-theta (polar) + projection where r = 0 is at the center of the plot the meaning of the + cap is reversed, i.e., *85/90* will draw a r = 5 radius circle at the + center of the map with less frequent radial lines there. **MAP_SCALE_HEIGHT** Sets the height (> 0) on the map of the map scale bars drawn by various programs [default is **5p**]. **MAP_TICK_LENGTH** - Sets both :term:`MAP_TICK_LENGTH_PRIMARY` and :term:`MAP_TICK_LENGTH_SECONDARY` to the value specified. - This setting is not included in the **gmt.conf** file. + Sets both :term:`MAP_TICK_LENGTH_PRIMARY` and :term:`MAP_TICK_LENGTH_SECONDARY` + to the value specified. This setting is not included in the **gmt.conf** file. **MAP_TICK_LENGTH_PRIMARY** - The length of a primary major/minor tick-marks [default is **5p/2.5p**]. If only - the first value is set, the second is assumed to be 50% of the first. + The length of a primary major/minor tick-marks [default is :doc:`theme dependent + `]. If only the first value is set, the second + is assumed to be 50% of the first. Choose **auto** for :ref:`automatic + scaling with plot size `. **MAP_TICK_LENGTH_SECONDARY** - The length of a secondary major/minor tick-marks [default is **15p/3.75p**]. If - only the first value is set, the second is assumed to be 25% of the first. + The length of a secondary major/minor tick-marks [default is :doc:`theme dependent + `]. If only the first value is set, the second is assumed + to be 25% of the first. Choose **auto** for :ref:`automatic scaling with + plot size `. **MAP_TICK_PEN** - Sets both :term:`MAP_TICK_PEN_PRIMARY` and :term:`MAP_TICK_PEN_SECONDARY` to the value specified. - This setting is not included in the **gmt.conf** file. + Sets both :term:`MAP_TICK_PEN_PRIMARY` and :term:`MAP_TICK_PEN_SECONDARY` + to the value specified. This setting is not included in the **gmt.conf** file. **MAP_TICK_PEN_PRIMARY** Pen attributes to be used for primary tick-marks in dpi units or - points (append **p**) [default is **thinner,black**]. + points (append **p**) [default is :doc:`theme dependent `]. + Choose **auto** for :ref:`automatic scaling with plot size `. **MAP_TICK_PEN_SECONDARY** Pen attributes to be used for secondary tick-marks in dpi units or - points (append **p**) [default is **thinner,black**]. + points (append **p**) [default is :doc:`theme dependent `]. + Choose **auto** for :ref:`automatic scaling with plot size `. **MAP_TITLE_OFFSET** Distance from top of axis annotations (or axis label, if present) to - base of plot title [default is **14p**]. + base of plot title [default is :doc:`theme dependent `]. + Choose **auto** for :ref:`automatic scaling with plot size `. **MAP_VECTOR_SHAPE** Determines the shape of the head of a vector. Normally (i.e., for vector_shape = **0**), the head will be triangular, but can be changed - to an arrow (**1**) or an open V (**2**). - Intermediate settings give something in between. Negative values (up - to **-2**) are allowed as well [default is **0**]. + to an arrow (**1**) or an open V (**2**). Intermediate settings give + something in between. Negative values (up to **-2**) are allowed as well + [default is :doc:`theme dependent `]. .. _Projection Parameters: @@ -815,15 +877,16 @@ Projection Parameters .. glossary:: **PROJ_AUX_LATITUDE** - Only applies when geodesics are approximated by great circle - distances on an equivalent sphere. Select from **authalic**, **geocentric**, - **conformal**, **meridional**, **parametric**, or **none** (i.e., geodetic) [default is **authalic**]. When not none - we convert any latitude used in the great circle calculation to the - chosen auxiliary latitude before doing the distance calculation. See - also :term:`PROJ_MEAN_RADIUS`. + Only applies when geodesics are approximated by great circle distances on + an equivalent sphere. Select from **authalic**, **geocentric**, + **conformal**, **meridional**, **parametric**, or **none** (i.e., geodetic) + [default is **authalic**]. When not none we convert any latitude used in + the great circle calculation to the chosen auxiliary latitude before + doing the distance calculation. See also :term:`PROJ_MEAN_RADIUS`. **PROJ_ELLIPSOID** - The (case sensitive) name of the ellipsoid used for the map projections [WGS-84]. Choose among: + The (case sensitive) name of the ellipsoid used for the map projections + [WGS-84]. Choose among: - *Airy*: Applies to Great Britain (1830) - *Airy-Ireland*: Applies to Ireland in 1965 (1830) @@ -932,16 +995,16 @@ Projection Parameters **PROJ_LENGTH_UNIT** Sets the default unit length. Choose between **c**\ m, **i**\ nch, or - **p**\ oint [default is **c** *(or i)*]. - **Note**: In GMT, one point is defined as 1/72 inch (the PostScript definition), - while it is often defined as 1/72.27 inch in the typesetting industry. - There is no universal definition.) + **p**\ oint [default is **c** *(or i)*]. **Note**: In GMT, one point is + defined as 1/72 inch (the PostScript definition), while it is often + defined as 1/72.27 inch in the typesetting industry. There is no universal + definition.) **PROJ_MEAN_RADIUS** Applies when geodesics are approximated by great circle distances on an equivalent sphere or when surface areas are computed. Select from - **mean** (R_1), **authalic** (R_2), **volumetric** (R_3), **meridional**, or - **quadratic** [default is **authalic**]. + **mean** (R_1), **authalic** (R_2), **volumetric** (R_3), **meridional**, + or **quadratic** [default is **authalic**]. **PROJ_SCALE_FACTOR** Changes the default map scale factor used for the Polar @@ -959,22 +1022,23 @@ PostScript Parameters **PS_CHAR_ENCODING** (*static*) Names the eight bit character set being used for text in - files and in command line parameters. This allows GMT to ensure - that the PostScript output generates the correct characters on the - plot. Choose from **Standard**, **Standard+**, **ISOLatin1**, **ISOLatin1+**, and - **ISO-8859-x** (where *x* is in the ranges 1-11 or 13-16). See - Appendix F for details [default is **ISOLatin1+** *(or Standard+)*]. - **Note**: Normally the character set is written as part of the PostScript header. + files and in command line parameters. This allows GMT to ensure that the + PostScript output generates the correct characters on the plot. Choose from + **Standard**, **Standard+**, **ISOLatin1**, **ISOLatin1+**, and + **ISO-8859-x** (where *x* is in the ranges 1-11 or 13-16). See Appendix F + for details [default is **ISOLatin1+** *(or Standard+)*]. **Note**: + Normally the character set is written as part of the PostScript header. If you need to switch to another character set for a later overlay then - you must use **--PS_CHAR_ENCODING**\ =\ *encoding* on the command line and - not via gmt :doc:`/gmtset`. Finally, note 6, 8, and 11 do not work with standard fonts. + you must use **--PS_CHAR_ENCODING**\ =\ *encoding* on the command line + and not via gmt :doc:`/gmtset`. Finally, note 6, 8, and 11 do not work + with standard fonts. **PS_COLOR_MODEL** - Determines whether PostScript output should use **RGB**, **HSV**, **CMYK**, or - **GRAY** when specifying color [default is **rgb**]. Note if **HSV** is selected it does - not apply to images which in that case uses **RGB**. When selecting - **GRAY**, all colors will be converted to gray scale using YIQ - (television) conversion. + Determines whether PostScript output should use **RGB**, **HSV**, **CMYK**, + or **GRAY** when specifying color [default is **rgb**]. Note if **HSV** + is selected it does not apply to images which in that case uses **RGB**. + When selecting **GRAY**, all colors will be converted to gray scale using + YIQ (television) conversion. **PS_COMMENTS** (*static*) If **true** we will issue comments in the PostScript file @@ -983,17 +1047,17 @@ PostScript Parameters which yields a somewhat slimmer PostScript file [default is **false**]. **PS_CONVERT** - Comma-separated list of optional module arguments that we should - supply when :doc:`psconvert` is called implicitly under modern mode [**A**]. + Comma-separated list of optional module arguments that we should supply + when :doc:`psconvert` is called implicitly under modern mode [**A**]. Ignored when psconvert is called on the command line explicitly. The option arguments must be listed without their leading option hyphen. **PS_IMAGE_COMPRESS** Determines if PostScript images are compressed using the Run-Length Encoding scheme (**rle**), Lempel-Ziv-Welch compression (**lzw**), DEFLATE - compression (**deflate**\ [,\ *level*]), or not at all (**none**) [default is **deflate,5**]. When - specifying **deflate**, the compression level (1–9) may optionally be - appended. + compression (**deflate**\ [,\ *level*]), or not at all (**none**) [default + is **deflate,5**]. When specifying **deflate**, the compression level + (1–9) may optionally be appended. **PS_LINE_CAP** Determines how the ends of a line segment will be drawn. Choose @@ -1010,15 +1074,18 @@ PostScript Parameters frame; if the angle is too acute, a bevel join is used instead, with threshold set by :term:`PS_MITER_LIMIT`), **round** join where a circular arc is used to fill in the cracks at the kinks, and **bevel** - join which is a miter join that is cut off so kinks are triangular in shape [default is **miter**]. + join which is a miter join that is cut off so kinks are triangular in + shape [default is **miter**]. **PS_MEDIA** - *Classic mode:* Sets the physical size of the current plotting paper [default is **a4** *(or letter)*]. - *Modern mode:* If user selects PostScript output then the above applies as well. - For other graphics formats (PDF and rasters), the media size is determined automatically - by cropping to fit the plot exactly (but see :term:`PS_CONVERT`). However, - if a specific media size is desired then the :term:`PS_MEDIA` may be specified as well. - The following formats (and their widths and heights in points) are recognized: + *Classic mode:* Sets the physical size of the current plotting paper + [default is **a4** *(or letter)*]. *Modern mode:* If user selects + PostScript output then the above applies as well. For other graphics + formats (PDF and rasters), the media size is determined automatically + by cropping to fit the plot exactly (but see :term:`PS_CONVERT`). However, + if a specific media size is desired then the :term:`PS_MEDIA` may be + specified as well. The following formats (and their widths and heights + in points) are recognized: ======== ======== ======== ========== ======== ======== Media width height Media width height @@ -1042,8 +1109,8 @@ PostScript Parameters B5 501 709 ======== ======== ======== ========== ======== ======== - For a completely custom format (e.g., for large format plotters) you - may also specify **WxH**, where **W** and **H** are in points unless you append + For a completely custom format (e.g., for large format plotters) you may + also specify **WxH**, where **W** and **H** are in points unless you append a unit to each dimension (**c**, **i**, **m** or **p** [default is **p**]). Additional user-specific formats may be saved as separate line in a gmt_custom_media.conf file stored in ~/.gmt. Each record would have a @@ -1077,9 +1144,10 @@ PostScript Parameters **PS_TRANSPARENCY** Sets the transparency mode to use when preparing PS for rendering to - PDF. Choose from **Color**, **ColorBurn**, **ColorDodge**, **Darken**, **Difference**, - **Exclusion**, **HardLight**, **Hue**, **Lighten**, **Luminosity**, **Multiply**, **Normal**, - **Overlay**, **Saturation**, **SoftLight**, and **Screen** [default is **Normal**]. + PDF. Choose from **Color**, **ColorBurn**, **ColorDodge**, **Darken**, + **Difference**, **Exclusion**, **HardLight**, **Hue**, **Lighten**, + **Luminosity**, **Multiply**, **Normal**, **Overlay**, **Saturation**, + **SoftLight**, and **Screen** [default is **Normal**]. .. _Calendar/Time Parameters: @@ -1111,11 +1179,11 @@ Calendar/Time Parameters given. (2) **+n**\ *unit* : activate interval adjustment for input by truncate to previous whole number of *n* units and then center time on the following interval. (3) **-n**\ *unit*. Same, but center time on - the previous interval [default is **off**]. - For example, with **TIME_IS_INTERVAL** =+1o, an input data string - like 1999-12 will be interpreted to mean 1999-12-15T12:00:00.0 (exactly middle of December), - while if **TIME_IS_INTERVAL** = **off** then that date is interpreted to mean - 1999-12-01T00:00:00.0 (start of December). + the previous interval [default is **off**]. For example, with + **TIME_IS_INTERVAL** =+1o, an input data string like 1999-12 will be + interpreted to mean 1999-12-15T12:00:00.0 (exactly middle of December), + while if **TIME_IS_INTERVAL** = **off** then that date is interpreted + to mean 1999-12-01T00:00:00.0 (start of December). **TIME_REPORT** Controls if a time-stamp should be issued at start of all progress diff --git a/doc/rst/source/index.rst b/doc/rst/source/index.rst index ce21235e642..c2609a80a10 100644 --- a/doc/rst/source/index.rst +++ b/doc/rst/source/index.rst @@ -25,6 +25,7 @@ Quick links - :ref:`Pen Syntax <-Wpen_attrib>` - :ref:`Fill Syntax <-Gfill_attrib>` - :ref:`Grid Format Specifications ` + - :doc:`theme-settings` .. Add a hidden toctree to suppress "document isn't included in any toctree" warnings .. toctree:: @@ -33,6 +34,7 @@ Quick links std-opts gmt.conf gmtcolors + theme-settings .. panels:: diff --git a/doc/rst/source/theme-settings.rst b/doc/rst/source/theme-settings.rst new file mode 100644 index 00000000000..a3911c3dab1 --- /dev/null +++ b/doc/rst/source/theme-settings.rst @@ -0,0 +1,69 @@ +########## +GMT Themes +########## + +GMT offers 3 build-in themes (classic, modern, and minimal). Classic theme is the default for classic mode and modern +theme is the default for modern mode. You can also create and use your own themes by compiling files of desired settings +and placing them in your GMT user themes directory (usually ~/.gmt/themes) and naming them *theme*.conf, where *theme* +is any valid string. The :term:`GMT_THEME` parameter is used to set the current theme. The table below lists the +default settings for the classic, modern, and minimal themes. + +Default settings for build-in themes +------------------------------------ ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| Parameter | Classic | Modern | Minimal | ++===================================+=================================+=================================+=================================+ +| :term:`FONT_ANNOT_PRIMARY` | 12p,Helvetica,black | auto,Helvetica,black | auto,AvantGarde-Book,black | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`FONT_ANNOT_SECONDARY` | 14p,Helvetica,black | auto,Helvetica,black | auto,AvantGarde-Book,black | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`FONT_HEADING` | 32p,Helvetica,black | auto,Helvetica-Bold,black | auto,AvantGarde-Book,black | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`FONT_LABEL` | 16p,Helvetica,black | auto,Helvetica,black | auto,AvantGarde-Book,black | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`FONT_LOGO` | 8p,Helvetica,black | auto,Helvetica,black | auto,Helvetica,black | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`FONT_SUBTITLE` | 18p,Helvetica,black | auto,Helvetica-Bold,black | auto,AvantGarde-Book,black | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`FONT_TAG` | 20p,Helvetica,black | auto,Helvetica,black | auto,AvantGarde-Book,black | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`FONT_TITLE` | 24p,Helvetica,black | auto,Helvetica-Bold,black | auto,AvantGarde-Book,black | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`FORMAT_GEO_MAP` | ddd:mm:ss | ddd:mm:ssF | ddd:mm:ss | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_ANNOT_MIN_SPACING` | 0p | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_ANNOT_OFFSET_PRIMARY` | 5p | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_ANNOT_OFFSET_SECONDARY`| 5p | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_FRAME_AXES` | WESNZ | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_FRAME_PEN` | thicker,black | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_FRAME_TYPE` | fancy | fancy | plain | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_FRAME_WIDTH` | 5p | :ref:`auto ` | n/a | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_GRID_PEN_PRIMARY` | default,black | :ref:`auto ` | thinner, lightgrey | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_GRID_PEN_SECONDARY` | thinner,black | :ref:`auto ` | thinnest, lightgrey | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_HEADING_OFFSET` | 18p | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_LABEL_OFFSET` | 8p | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_POLAR_CAP` | 85/90 | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_TICK_LENGTH_PRIMARY` | 5p/2.5p | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_TICK_LENGTH_SECONDARY` | 15p/3.75p | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_TICK_PEN_PRIMARY` | default,black | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_TICK_PEN_SECONDARY` | thinner,black | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_TITLE_OFFSET` | 14p | :ref:`auto ` | :ref:`auto ` | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ +| :term:`MAP_VECTOR_SHAPE` | 0 | 0.5 | 0.5 | ++-----------------------------------+---------------------------------+---------------------------------+---------------------------------+ \ No newline at end of file diff --git a/doc/scripts/GMT_-B_custom.ps b/doc/scripts/GMT_-B_custom.ps index 5af7db47338..63ca013b2db 100644 Binary files a/doc/scripts/GMT_-B_custom.ps and b/doc/scripts/GMT_-B_custom.ps differ diff --git a/doc/scripts/GMT_-B_custom.sh b/doc/scripts/GMT_-B_custom.sh index 17d876632b5..d24307c2bbe 100755 --- a/doc/scripts/GMT_-B_custom.sh +++ b/doc/scripts/GMT_-B_custom.sh @@ -19,6 +19,7 @@ cat << EOF >| yannots.txt EOF gmt begin GMT_-B_custom + gmt set GMT_THEME cookbook gmt basemap -R416/542/0/6.2831852 -JX-12c/6c -Bpx25f5g25+u" Ma" -Bpycyannots.txt -Bsxcxannots.txt -BWS+glightblue \ --MAP_ANNOT_OFFSET_SECONDARY=10p --MAP_GRID_PEN_SECONDARY=2p gmt end show diff --git a/doc/scripts/GMT_-B_geo_1.ps b/doc/scripts/GMT_-B_geo_1.ps index b5be5d7ba6d..701fbb5afa4 100644 Binary files a/doc/scripts/GMT_-B_geo_1.ps and b/doc/scripts/GMT_-B_geo_1.ps differ diff --git a/doc/scripts/GMT_-B_geo_1.sh b/doc/scripts/GMT_-B_geo_1.sh index 63041e9c55e..5ee5a3d69fc 100755 --- a/doc/scripts/GMT_-B_geo_1.sh +++ b/doc/scripts/GMT_-B_geo_1.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_geo_1 + gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP ddd:mm:ssF gmt basemap -R-1/2/0/0.4 -JM3i -Ba1f15mg5m -BS gmt plot -Sv2p+e+a60 -W0.5p -Gblack -Y-0.35i -N << EOF diff --git a/doc/scripts/GMT_-B_geo_2.ps b/doc/scripts/GMT_-B_geo_2.ps index 9117f29f290..81fa4c9e4d9 100644 Binary files a/doc/scripts/GMT_-B_geo_2.ps and b/doc/scripts/GMT_-B_geo_2.ps differ diff --git a/doc/scripts/GMT_-B_geo_2.sh b/doc/scripts/GMT_-B_geo_2.sh index 6e14b5bcc1e..61e354886f2 100755 --- a/doc/scripts/GMT_-B_geo_2.sh +++ b/doc/scripts/GMT_-B_geo_2.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_geo_2 + gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP ddd:mm:ssF FONT_ANNOT_PRIMARY +9p gmt basemap -R-2/1/0/0.35 -JM4i -Bpa15mf5mg5m -BwSe -Bs1f30mg15m --MAP_FRAME_TYPE=fancy-rounded \ --MAP_GRID_PEN_PRIMARY=thinnest,black,. --MAP_GRID_CROSS_SIZE_SECONDARY=0.1i \ diff --git a/doc/scripts/GMT_-B_linear.ps b/doc/scripts/GMT_-B_linear.ps index 7f1ef1855ba..778dfe3ab36 100644 Binary files a/doc/scripts/GMT_-B_linear.ps and b/doc/scripts/GMT_-B_linear.ps differ diff --git a/doc/scripts/GMT_-B_linear.sh b/doc/scripts/GMT_-B_linear.sh index 85a6dd3b8d1..fce8db72021 100755 --- a/doc/scripts/GMT_-B_linear.sh +++ b/doc/scripts/GMT_-B_linear.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_linear + gmt set GMT_THEME cookbook gmt basemap -R0/12/0/0.95 -JX7.5c/0.75c -Ba4f2g1+lFrequency+u" %" -BS gmt plot -Sv2p+e+a60 -W0.5p -Gblack -Y0.25c -N << EOF 2 0 0 0.5 diff --git a/doc/scripts/GMT_-B_log.ps b/doc/scripts/GMT_-B_log.ps index f715612b0c5..61e6628d16d 100644 Binary files a/doc/scripts/GMT_-B_log.ps and b/doc/scripts/GMT_-B_log.ps differ diff --git a/doc/scripts/GMT_-B_log.sh b/doc/scripts/GMT_-B_log.sh index 4662423b0e9..9fe7830b597 100755 --- a/doc/scripts/GMT_-B_log.sh +++ b/doc/scripts/GMT_-B_log.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_log + gmt set GMT_THEME cookbook gmt set MAP_GRID_PEN_PRIMARY thinnest,. gmt basemap -R1/1000/0/1 -JX7.5cl/0.6c -B1f2g3p+l"Axis Label" -BS gmt basemap -B1f2g3l+l"Axis Label" -BS -Y2.15c diff --git a/doc/scripts/GMT_-B_pow.ps b/doc/scripts/GMT_-B_pow.ps index ab52157e9d6..88b3258f9e8 100644 Binary files a/doc/scripts/GMT_-B_pow.ps and b/doc/scripts/GMT_-B_pow.ps differ diff --git a/doc/scripts/GMT_-B_pow.sh b/doc/scripts/GMT_-B_pow.sh index b914af99c9e..4e029a0c933 100755 --- a/doc/scripts/GMT_-B_pow.sh +++ b/doc/scripts/GMT_-B_pow.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_pow + gmt set GMT_THEME cookbook gmt set MAP_GRID_PEN_PRIMARY thinnest,. gmt basemap -R0/100/0/0.9 -JX3ip0.5/0.25i -Ba3f2g1p+l"Axis Label" -BS gmt basemap -Ba20f10g5+l"Axis Label" -BS -Y0.85i diff --git a/doc/scripts/GMT_-B_slanted.sh b/doc/scripts/GMT_-B_slanted.sh index c0bfd71b480..41852ba1cd2 100755 --- a/doc/scripts/GMT_-B_slanted.sh +++ b/doc/scripts/GMT_-B_slanted.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt basemap -R2000/2020/35/45 -JX12c -Bxa2f+a-30 -BS -ps GMT_-B_slanted +gmt basemap -R2000/2020/35/45 -JX12c -Bxa2f+a-30 -BS --GMT_THEME=cookbook -ps GMT_-B_slanted diff --git a/doc/scripts/GMT_-B_time1.ps b/doc/scripts/GMT_-B_time1.ps index 0d57e5c70b1..73932ed094e 100644 Binary files a/doc/scripts/GMT_-B_time1.ps and b/doc/scripts/GMT_-B_time1.ps differ diff --git a/doc/scripts/GMT_-B_time1.sh b/doc/scripts/GMT_-B_time1.sh index db53b194e64..a20045995c5 100755 --- a/doc/scripts/GMT_-B_time1.sh +++ b/doc/scripts/GMT_-B_time1.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_time1 + gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP=-o FONT_ANNOT_PRIMARY +9p gmt basemap -R2000-4-1T/2000-5-25T/0/1 -JX12c/0.5c -Bpxa7Rf1d -Bsxa1O -BS gmt end show diff --git a/doc/scripts/GMT_-B_time2.ps b/doc/scripts/GMT_-B_time2.ps index c70fdd18815..0605327d101 100644 Binary files a/doc/scripts/GMT_-B_time2.ps and b/doc/scripts/GMT_-B_time2.ps differ diff --git a/doc/scripts/GMT_-B_time2.sh b/doc/scripts/GMT_-B_time2.sh index 631dadfd26a..5c9ae477506 100755 --- a/doc/scripts/GMT_-B_time2.sh +++ b/doc/scripts/GMT_-B_time2.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_time2 + gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP "o dd" FORMAT_CLOCK_MAP hh:mm FONT_ANNOT_PRIMARY +9p gmt basemap -R1969-7-21T/1969-7-23T/0/1 -JX12c/0.5c -Bpxa6Hf1h -Bsxa1K -BS gmt basemap -Bpxa6Hf1h -Bsxa1D -BS -Y1.6c diff --git a/doc/scripts/GMT_-B_time3.ps b/doc/scripts/GMT_-B_time3.ps index 694c9dfc5da..65014432829 100644 Binary files a/doc/scripts/GMT_-B_time3.ps and b/doc/scripts/GMT_-B_time3.ps differ diff --git a/doc/scripts/GMT_-B_time3.sh b/doc/scripts/GMT_-B_time3.sh index 1bf216592fc..8c7e2f5c22e 100755 --- a/doc/scripts/GMT_-B_time3.sh +++ b/doc/scripts/GMT_-B_time3.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_time3 + gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP o FORMAT_TIME_PRIMARY_MAP Character FONT_ANNOT_PRIMARY +9p gmt basemap -R1997T/1999T/0/1 -JX12c/0.5c -Bpxa3Of1o -Bsxa1Y -BS gmt end show diff --git a/doc/scripts/GMT_-B_time4.ps b/doc/scripts/GMT_-B_time4.ps index 6be0376ff98..e3ad8dbad6d 100644 Binary files a/doc/scripts/GMT_-B_time4.ps and b/doc/scripts/GMT_-B_time4.ps differ diff --git a/doc/scripts/GMT_-B_time4.sh b/doc/scripts/GMT_-B_time4.sh index 0f17877ee53..e3ad1d8044c 100755 --- a/doc/scripts/GMT_-B_time4.sh +++ b/doc/scripts/GMT_-B_time4.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_time4 + gmt set GMT_THEME cookbook gmt set FORMAT_CLOCK_MAP=-hham FONT_ANNOT_PRIMARY +9p TIME_UNIT d gmt basemap -R0.2t/0.35t/0/1 -JX-12c/0.5c -Bpxa15mf5m -Bsxa1H -BS gmt end show diff --git a/doc/scripts/GMT_-B_time5.ps b/doc/scripts/GMT_-B_time5.ps index 8e8aad245d5..1faa058bad3 100644 Binary files a/doc/scripts/GMT_-B_time5.ps and b/doc/scripts/GMT_-B_time5.ps differ diff --git a/doc/scripts/GMT_-B_time5.sh b/doc/scripts/GMT_-B_time5.sh index d6671d20f33..19ed8782dd4 100755 --- a/doc/scripts/GMT_-B_time5.sh +++ b/doc/scripts/GMT_-B_time5.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_time5 + gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP u FORMAT_TIME_PRIMARY_MAP Character FORMAT_TIME_SECONDARY_MAP full FONT_ANNOT_PRIMARY +9p gmt basemap -R1969-7-21T/1969-8-9T/0/1 -JX12c/0.5c -Bpxa1K -Bsxa1U -BS gmt set FORMAT_DATE_MAP o TIME_WEEK_START Sunday FORMAT_TIME_SECONDARY_MAP Character diff --git a/doc/scripts/GMT_-B_time6.ps b/doc/scripts/GMT_-B_time6.ps index 8885b8faf91..af95c87f9e0 100644 Binary files a/doc/scripts/GMT_-B_time6.ps and b/doc/scripts/GMT_-B_time6.ps differ diff --git a/doc/scripts/GMT_-B_time6.sh b/doc/scripts/GMT_-B_time6.sh index e6c21afc159..6fa73afab92 100755 --- a/doc/scripts/GMT_-B_time6.sh +++ b/doc/scripts/GMT_-B_time6.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_time6 + gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP "o yy" FORMAT_TIME_PRIMARY_MAP Abbreviated gmt basemap -R1996T/1996-6T/0/1 -JX12c/0.5c -Bxa1Of1d -BS gmt end show diff --git a/doc/scripts/GMT_-B_time7.ps b/doc/scripts/GMT_-B_time7.ps index 8e2bbc0f048..7e574252213 100644 Binary files a/doc/scripts/GMT_-B_time7.ps and b/doc/scripts/GMT_-B_time7.ps differ diff --git a/doc/scripts/GMT_-B_time7.sh b/doc/scripts/GMT_-B_time7.sh index e0470160aad..fbd8ff5fe90 100755 --- a/doc/scripts/GMT_-B_time7.sh +++ b/doc/scripts/GMT_-B_time7.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-B_time7 + gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP jjj TIME_INTERVAL_FRACTION 0.05 FONT_ANNOT_PRIMARY +9p gmt basemap -R2000-12-15T/2001-1-15T/0/1 -JX12c/0.5c -Bpxa5Df1d -Bsxa1Y -BS gmt end show diff --git a/doc/scripts/GMT_-J.sh b/doc/scripts/GMT_-J.sh index eeef6b58175..264761ce8a4 100755 --- a/doc/scripts/GMT_-J.sh +++ b/doc/scripts/GMT_-J.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-J + gmt set GMT_THEME cookbook gmt text -R0/5/0/3 -Jx1i -F+f+j << EOF 2.5 2.8 16p,Helvetica-Bold BC GMT PROJECTIONS 2 2.25 12p,Helvetica-Bold BC GEOGRAPHIC PROJECTIONS diff --git a/doc/scripts/GMT_-R.ps b/doc/scripts/GMT_-R.ps index 019eae51853..359c088cc9d 100644 Binary files a/doc/scripts/GMT_-R.ps and b/doc/scripts/GMT_-R.ps differ diff --git a/doc/scripts/GMT_-R.sh b/doc/scripts/GMT_-R.sh index 9f472e3063f..b73cdc75386 100755 --- a/doc/scripts/GMT_-R.sh +++ b/doc/scripts/GMT_-R.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-R + gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE PLAIN FONT_ANNOT_PRIMARY 8p,Helvetica MAP_TICK_LENGTH_PRIMARY 0.05i \ PS_CHAR_ENCODING ISOLatin1+ gmt coast -R-90/-70/18/35.819 -JM2i -Dl -Glightbrown -Wthinnest -Ba10g5 -BWsEN diff --git a/doc/scripts/GMT_-U.sh b/doc/scripts/GMT_-U.sh index ccb98e61088..a8975050664 100755 --- a/doc/scripts/GMT_-U.sh +++ b/doc/scripts/GMT_-U.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt plot -R0/3/0/0.1 -Jx1i -U"optional command string or text here" -T -ps GMT_-U +gmt plot -R0/3/0/0.1 -Jx1i -U"optional command string or text here" -T --GMT_THEME=cookbook -ps GMT_-U diff --git a/doc/scripts/GMT_-XY.ps b/doc/scripts/GMT_-XY.ps index 06d9b9c6a8c..7861090c1c5 100644 Binary files a/doc/scripts/GMT_-XY.ps and b/doc/scripts/GMT_-XY.ps differ diff --git a/doc/scripts/GMT_-XY.sh b/doc/scripts/GMT_-XY.sh index e2452acddcc..6047e8b066c 100755 --- a/doc/scripts/GMT_-XY.sh +++ b/doc/scripts/GMT_-XY.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_-XY + gmt set GMT_THEME cookbook gmt basemap -R0/1.5/0/1.7 -Jx1i -B0 -B+glightyellow gmt plot -Sv5p+e -W0.5p -Gblack << EOF 0.2 0.2 0 1.1 diff --git a/doc/scripts/GMT_API_flow.sh b/doc/scripts/GMT_API_flow.sh index e6259492eeb..7d95e9e70ee 100755 --- a/doc/scripts/GMT_API_flow.sh +++ b/doc/scripts/GMT_API_flow.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_API_flow + gmt set GMT_THEME cookbook gmt text -R-2/3/-1/1 -Jx1i -F+f14p,Helvetica-Bold -Gwhite -W0.5p -N -C50% -X2i << EOF -2 0 EXTERNAL INTERFACE 0 0 gmt diff --git a/doc/scripts/GMT_API_use.ps b/doc/scripts/GMT_API_use.ps index 1b2e132aecc..95cc2bbb2b2 100644 Binary files a/doc/scripts/GMT_API_use.ps and b/doc/scripts/GMT_API_use.ps differ diff --git a/doc/scripts/GMT_API_use.sh b/doc/scripts/GMT_API_use.sh index 1e4c38682d7..ca5cfaaa21d 100755 --- a/doc/scripts/GMT_API_use.sh +++ b/doc/scripts/GMT_API_use.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_API_use + gmt set GMT_THEME cookbook gmt plot -R-4.5/4.5/-2/2 -Jx0.8i -W2p+ve0.2i+gblack+h0.5 -Xc << EOF > -2 0.75 @@ -34,7 +35,7 @@ EOF EOF gmt text -F+f12p+jCM -Gwhite -W0.25p -C50% << EOF -2.8 0.75 FILES OR STDIN -+2.8 0.75 FILES OR STDIN ++2.8 0.75 FILES OR STDOUT EOF gmt text -F+f12p+jCM -Glightblue -W0.25p -C50% << EOF -2.8 0.0 STREAMS, FILE DESCRIPTORS diff --git a/doc/scripts/GMT_App_E.sh b/doc/scripts/GMT_App_E.sh index 7852baadae7..2a39c18b2d3 100755 --- a/doc/scripts/GMT_App_E.sh +++ b/doc/scripts/GMT_App_E.sh @@ -21,6 +21,7 @@ $xwidth $ywidth END gmt begin GMT_App_E +gmt set GMT_THEME cookbook gmt basemap -R0/5.75/0/7.55 -Jx1i -B0 gmt set MAP_FRAME_PEN thinner for iy in 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 diff --git a/doc/scripts/GMT_App_F_stand+_iso+.ps b/doc/scripts/GMT_App_F_stand+_iso+.ps index b700a5a0814..6c745bc5716 100644 Binary files a/doc/scripts/GMT_App_F_stand+_iso+.ps and b/doc/scripts/GMT_App_F_stand+_iso+.ps differ diff --git a/doc/scripts/GMT_App_F_stand+_iso+.sh b/doc/scripts/GMT_App_F_stand+_iso+.sh index 52d2acedcde..8cb07fded81 100755 --- a/doc/scripts/GMT_App_F_stand+_iso+.sh +++ b/doc/scripts/GMT_App_F_stand+_iso+.sh @@ -63,6 +63,7 @@ EOF $AWK -f tt.awk tt.txt > tt.d gmt begin + gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thick FONT_TITLE 14p # First chart for standard font diff --git a/doc/scripts/GMT_App_F_symbol_dingbats.ps b/doc/scripts/GMT_App_F_symbol_dingbats.ps index 2d168a60b30..b4fe6cc6f4e 100644 Binary files a/doc/scripts/GMT_App_F_symbol_dingbats.ps and b/doc/scripts/GMT_App_F_symbol_dingbats.ps differ diff --git a/doc/scripts/GMT_App_F_symbol_dingbats.sh b/doc/scripts/GMT_App_F_symbol_dingbats.sh index 5a4429f8c7d..2205a100f71 100755 --- a/doc/scripts/GMT_App_F_symbol_dingbats.sh +++ b/doc/scripts/GMT_App_F_symbol_dingbats.sh @@ -6,6 +6,7 @@ # plot it with gmt pstext, including the header row and left column gmt begin GMT_App_F_symbol_dingbats +gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thick FONT_TITLE 14p # Chart for Symbols font diff --git a/doc/scripts/GMT_App_G.sh b/doc/scripts/GMT_App_G.sh index 2437de87558..69824474679 100755 --- a/doc/scripts/GMT_App_G.sh +++ b/doc/scripts/GMT_App_G.sh @@ -9,6 +9,7 @@ y0=4.3 yy=4.0778 tr '",' ' ' < "${GMT_SOURCE_DIR}"/src/standard_adobe_fonts.h | awk '{print $2}' > tt.d gmt begin GMT_App_G +gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner gmt plot -R0/5.4/0/$y0 -Jx1i -B0 < diff --git a/doc/scripts/GMT_App_J_1.ps b/doc/scripts/GMT_App_J_1.ps index a45f98ec388..dfb206bce7c 100644 Binary files a/doc/scripts/GMT_App_J_1.ps and b/doc/scripts/GMT_App_J_1.ps differ diff --git a/doc/scripts/GMT_App_J_1.sh b/doc/scripts/GMT_App_J_1.sh index 12a4d4f1326..77e8b7ebd77 100755 --- a/doc/scripts/GMT_App_J_1.sh +++ b/doc/scripts/GMT_App_J_1.sh @@ -73,6 +73,7 @@ #--------------------------------------------------- gmt begin GMT_App_J_1 +gmt set GMT_THEME cookbook RJ="-R-0.6/0.6/-0.1/1.1 -JX4i/2i" echo "-0.5 0" > tt.tmp gmt math -T-0.5/0.5/0.01 1 = >> tt.tmp diff --git a/doc/scripts/GMT_App_J_2.ps b/doc/scripts/GMT_App_J_2.ps index 0f86a8b8cfa..4a3bb7a980b 100644 Binary files a/doc/scripts/GMT_App_J_2.ps and b/doc/scripts/GMT_App_J_2.ps differ diff --git a/doc/scripts/GMT_App_J_2.sh b/doc/scripts/GMT_App_J_2.sh index a163d6c62f5..955049e958f 100755 --- a/doc/scripts/GMT_App_J_2.sh +++ b/doc/scripts/GMT_App_J_2.sh @@ -73,6 +73,7 @@ # #--------------------------------------------------- gmt begin GMT_App_J_2 +gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 10p,Times-Roman FONT_TITLE 14p,Times-Roman FONT_LABEL 12p,Times-Roman gmt math -T0/5/0.01 T SINC = | gmt plot -R0/5/-0.3/1 -JX4i/2i -Bxa1f0.2+l"Frequency (cycles per filter width)" -Bya0.2f0.1g1+l"Gain" -BWeSn -Wthick gmt math -T0/5/0.01 T SINC 1 T T MUL SUB DIV = | grep -v '^>' | $AWK '{ if ($1 == 1) print 1, 0.5; else print $0}' | gmt plot -Wthick,- diff --git a/doc/scripts/GMT_App_J_3.ps b/doc/scripts/GMT_App_J_3.ps index f49587fcf40..f3f7dcce9a2 100644 Binary files a/doc/scripts/GMT_App_J_3.ps and b/doc/scripts/GMT_App_J_3.ps differ diff --git a/doc/scripts/GMT_App_J_3.sh b/doc/scripts/GMT_App_J_3.sh index 936778c33f1..53a4412426c 100755 --- a/doc/scripts/GMT_App_J_3.sh +++ b/doc/scripts/GMT_App_J_3.sh @@ -585,6 +585,7 @@ EOF # Also, I found that j0(x) and j1(x) are not reliable on some machines.... # gmt begin GMT_App_J_3 +gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 10p,Times-Roman FONT_TITLE 14p,Times-Roman FONT_LABEL 12p,Times-Roman cut -f1,2 tt.r_tr_fns | gmt plot -R0/5/-0.3/1 -JX4i/2i -Bxa1f0.2+l"Frequency (cycles per filter width)" -Bya0.2f0.1g1+l"Gain" -BWeSn -Wthick cut -f1,3 tt.r_tr_fns | gmt plot -Wthick,- diff --git a/doc/scripts/GMT_App_K_1.ps b/doc/scripts/GMT_App_K_1.ps index 38e652d5596..f7f886a4ca1 100644 Binary files a/doc/scripts/GMT_App_K_1.ps and b/doc/scripts/GMT_App_K_1.ps differ diff --git a/doc/scripts/GMT_App_K_1.sh b/doc/scripts/GMT_App_K_1.sh index ffd29b8c1a2..2242a06ec98 100755 --- a/doc/scripts/GMT_App_K_1.sh +++ b/doc/scripts/GMT_App_K_1.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash gmt begin GMT_App_K_1 + gmt set GMT_THEME cookbook gmt set MAP_GRID_CROSS_SIZE_PRIMARY 0 MAP_ANNOT_MIN_SPACING 0.3i \ - MAP_ANNOT_OBLIQUE lon_horizontal,lat_horizontal,tick_normal + MAP_ANNOT_OBLIQUE lon_parallel,lat_horizontal,tick_normal gmt coast -R-9000/9000/-9000/9000+uk -JE130.35/-0.2/3.5i -Dc \ -A500 -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B20g20 -BWSne echo 130.35 -0.2 | gmt plot -SJ-4000 -Wthicker diff --git a/doc/scripts/GMT_App_K_2.ps b/doc/scripts/GMT_App_K_2.ps index 9c2b5970e9e..fefd0d6424e 100644 Binary files a/doc/scripts/GMT_App_K_2.ps and b/doc/scripts/GMT_App_K_2.ps differ diff --git a/doc/scripts/GMT_App_K_2.sh b/doc/scripts/GMT_App_K_2.sh index f01524c85f3..58242dba647 100755 --- a/doc/scripts/GMT_App_K_2.sh +++ b/doc/scripts/GMT_App_K_2.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_App_K_2 + gmt set GMT_THEME cookbook gmt coast -R-2000/2000/-2000/2000+uk -JE130.35/-0.2/3.5i -Dl -A100 \ -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B10g5 -BWSne echo 130.35 -0.2 | gmt plot -SJ-1000 -Wthicker diff --git a/doc/scripts/GMT_App_K_3.ps b/doc/scripts/GMT_App_K_3.ps index 39b24d75618..8a6b1859dee 100644 Binary files a/doc/scripts/GMT_App_K_3.ps and b/doc/scripts/GMT_App_K_3.ps differ diff --git a/doc/scripts/GMT_App_K_3.sh b/doc/scripts/GMT_App_K_3.sh index f39f63b8474..624a3822da4 100755 --- a/doc/scripts/GMT_App_K_3.sh +++ b/doc/scripts/GMT_App_K_3.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_App_K_3 + gmt set GMT_THEME cookbook gmt coast -R-500/500/-500/500+uk -JE130.35/-0.2/3.5i -Di -A20 -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B2g1 -BWSne echo 133 2 | gmt plot -Sc1.4i -Gwhite gmt basemap -Tmg133/2+w1i+t45/10/5+jCM --FONT_TITLE=12p --MAP_TICK_LENGTH_PRIMARY=0.05i --FONT_ANNOT_SECONDARY=8p diff --git a/doc/scripts/GMT_App_K_4.ps b/doc/scripts/GMT_App_K_4.ps index d9ce494e78e..36f8d21939b 100644 Binary files a/doc/scripts/GMT_App_K_4.ps and b/doc/scripts/GMT_App_K_4.ps differ diff --git a/doc/scripts/GMT_App_K_4.sh b/doc/scripts/GMT_App_K_4.sh index 56b31489142..46f5c7f2ccb 100755 --- a/doc/scripts/GMT_App_K_4.sh +++ b/doc/scripts/GMT_App_K_4.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_App_K_4 + gmt set GMT_THEME cookbook gmt coast -R-100/100/-100/100+uk -JE130.35/-0.2/3.5i -Dh -A1 \ -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B30mg10m -BWSne echo 130.35 -0.2 | gmt plot -SJ-40 -Wthicker diff --git a/doc/scripts/GMT_App_K_5.ps b/doc/scripts/GMT_App_K_5.ps index a820b7598a0..e11a5993c18 100644 Binary files a/doc/scripts/GMT_App_K_5.ps and b/doc/scripts/GMT_App_K_5.ps differ diff --git a/doc/scripts/GMT_App_K_5.sh b/doc/scripts/GMT_App_K_5.sh index 20a6bd917ca..df0175ce01f 100755 --- a/doc/scripts/GMT_App_K_5.sh +++ b/doc/scripts/GMT_App_K_5.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_App_K_5 + gmt set GMT_THEME cookbook gmt coast -R-20/20/-20/20+uk -JE130.35/-0.2/3.5i -Df -Gburlywood -Sazure -Wthinnest -N1/thinnest,- -B10mg2m -BWSne gmt end show diff --git a/doc/scripts/GMT_App_M_1a.sh b/doc/scripts/GMT_App_M_1a.sh index 54b2b8f850d..a0cc8144837 100755 --- a/doc/scripts/GMT_App_M_1a.sh +++ b/doc/scripts/GMT_App_M_1a.sh @@ -59,6 +59,7 @@ dy=0.6 y0=$(gmt math -Q $n2 $dy MUL 0.1 ADD =) gmt begin GMT_App_M_1a +gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner FONT_ANNOT_PRIMARY 8p MAP_TICK_LENGTH_PRIMARY 0.1i MAP_ANNOT_OFFSET_PRIMARY 0.04i gmt basemap -R0/6.1/0/$y0 -Jx1i -B0 diff --git a/doc/scripts/GMT_App_M_1b.sh b/doc/scripts/GMT_App_M_1b.sh index 3fc6253432b..22fe58c645b 100755 --- a/doc/scripts/GMT_App_M_1b.sh +++ b/doc/scripts/GMT_App_M_1b.sh @@ -55,6 +55,7 @@ dy=0.6 y0=$(gmt math -Q $n2 $dy MUL 0.5 MUL 0.1 ADD =) gmt begin GMT_App_M_1b +gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner FONT_ANNOT_PRIMARY 8p MAP_TICK_LENGTH_PRIMARY 0.1i MAP_ANNOT_OFFSET_PRIMARY 0.04i gmt basemap -R0/6.1/0/$y0 -Jx1i -B0 diff --git a/doc/scripts/GMT_App_M_1c.sh b/doc/scripts/GMT_App_M_1c.sh index 42fe7af5cb0..9c0b0f8d9fe 100755 --- a/doc/scripts/GMT_App_M_1c.sh +++ b/doc/scripts/GMT_App_M_1c.sh @@ -42,6 +42,7 @@ dy=0.6 y0=$(gmt math -Q $n2 $dy MUL 0.5 MUL 0.1 ADD =) gmt begin GMT_App_M_1c +gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner FONT_ANNOT_PRIMARY 8p MAP_TICK_LENGTH_PRIMARY 0.1i MAP_ANNOT_OFFSET_PRIMARY 0.04i gmt basemap -R0/6.1/0/$y0 -Jx1i -B0 diff --git a/doc/scripts/GMT_App_M_1d.sh b/doc/scripts/GMT_App_M_1d.sh index 5f017f9580b..bc9cb660fcd 100755 --- a/doc/scripts/GMT_App_M_1d.sh +++ b/doc/scripts/GMT_App_M_1d.sh @@ -30,6 +30,7 @@ dy=0.6 y0=$(gmt math -Q $n2 $dy MUL 0.5 MUL 0.25 ADD =) gmt begin GMT_App_M_1d +gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thinner FONT_ANNOT_PRIMARY 8p MAP_TICK_LENGTH_PRIMARY 0.1i MAP_ANNOT_OFFSET_PRIMARY 0.04i gmt basemap -R0/6.1/0/$y0 -Jx1i -B0 diff --git a/doc/scripts/GMT_App_M_2.ps b/doc/scripts/GMT_App_M_2.ps index ef988e11874..878c56b1685 100644 Binary files a/doc/scripts/GMT_App_M_2.ps and b/doc/scripts/GMT_App_M_2.ps differ diff --git a/doc/scripts/GMT_App_M_2.sh b/doc/scripts/GMT_App_M_2.sh index dd8420e2fca..117b4751305 100755 --- a/doc/scripts/GMT_App_M_2.sh +++ b/doc/scripts/GMT_App_M_2.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_App_M_2 +gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 10p PROJ_LENGTH_UNIT cm PS_MEDIA 11ix8.5i # Set up color palette with named annotations diff --git a/doc/scripts/GMT_App_N_1.ps b/doc/scripts/GMT_App_N_1.ps index 42450f28076..cda3f89be0e 100644 Binary files a/doc/scripts/GMT_App_N_1.ps and b/doc/scripts/GMT_App_N_1.ps differ diff --git a/doc/scripts/GMT_App_N_1.sh b/doc/scripts/GMT_App_N_1.sh index d97af9b3ae9..8dfa3e285db 100755 --- a/doc/scripts/GMT_App_N_1.sh +++ b/doc/scripts/GMT_App_N_1.sh @@ -68,6 +68,7 @@ EOF done done gmt begin GMT_App_N_$p + gmt set GMT_THEME cookbook gmt plot -R0/$n_cols/0/$H -Jx${width}i tt.lines -Wthick -B0 gmt plot -S${width}i -W0.5p tt.symbols -Ggray gmt plot -Sri -Gblack tt.bars diff --git a/doc/scripts/GMT_App_O_1.ps b/doc/scripts/GMT_App_O_1.ps index fc1747797e0..364232f1ffa 100644 Binary files a/doc/scripts/GMT_App_O_1.ps and b/doc/scripts/GMT_App_O_1.ps differ diff --git a/doc/scripts/GMT_App_O_1.sh b/doc/scripts/GMT_App_O_1.sh index 37bb07eede6..113438560c4 100755 --- a/doc/scripts/GMT_App_O_1.sh +++ b/doc/scripts/GMT_App_O_1.sh @@ -3,6 +3,7 @@ # Makes Fig 1 for Appendix O (labeled lines) # gmt begin GMT_App_O_1 + gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+f8p -Gd1.5i -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_2.ps b/doc/scripts/GMT_App_O_2.ps index 6e80e080500..b04a7f61742 100644 Binary files a/doc/scripts/GMT_App_O_2.ps and b/doc/scripts/GMT_App_O_2.ps differ diff --git a/doc/scripts/GMT_App_O_2.sh b/doc/scripts/GMT_App_O_2.sh index 09bbb295c7d..f15e77d07f6 100755 --- a/doc/scripts/GMT_App_O_2.sh +++ b/doc/scripts/GMT_App_O_2.sh @@ -3,6 +3,7 @@ # Makes Fig 2 for Appendix O (labeled lines) # gmt begin GMT_App_O_2 + gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+f8p -Gn1/1i -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_3.ps b/doc/scripts/GMT_App_O_3.ps index fe3a62ea94f..7bd8445e5e6 100644 Binary files a/doc/scripts/GMT_App_O_3.ps and b/doc/scripts/GMT_App_O_3.ps differ diff --git a/doc/scripts/GMT_App_O_3.sh b/doc/scripts/GMT_App_O_3.sh index 3c76587ecbb..377f86ddd6a 100755 --- a/doc/scripts/GMT_App_O_3.sh +++ b/doc/scripts/GMT_App_O_3.sh @@ -9,6 +9,7 @@ cat << EOF > fix.txt 130 10.5 EOF gmt begin GMT_App_O_3 + gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+f8p -Gffix.txt/0.1i -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_4.ps b/doc/scripts/GMT_App_O_4.ps index ca6fa693198..0e9ac3f68aa 100644 Binary files a/doc/scripts/GMT_App_O_4.ps and b/doc/scripts/GMT_App_O_4.ps differ diff --git a/doc/scripts/GMT_App_O_4.sh b/doc/scripts/GMT_App_O_4.sh index 7b5694e1f48..eb741ee6793 100755 --- a/doc/scripts/GMT_App_O_4.sh +++ b/doc/scripts/GMT_App_O_4.sh @@ -3,6 +3,7 @@ # Makes Fig 4 for Appendix O (labeled lines) # gmt begin GMT_App_O_4 + gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+f8p -GLZ-/Z+ -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_5.ps b/doc/scripts/GMT_App_O_5.ps index c5a11c9f9ce..85af1f37272 100644 Binary files a/doc/scripts/GMT_App_O_5.ps and b/doc/scripts/GMT_App_O_5.ps differ diff --git a/doc/scripts/GMT_App_O_5.sh b/doc/scripts/GMT_App_O_5.sh index 7ec9ad7ac59..22ae701525b 100755 --- a/doc/scripts/GMT_App_O_5.sh +++ b/doc/scripts/GMT_App_O_5.sh @@ -3,6 +3,7 @@ # Makes Fig 5 for Appendix O (labeled lines) # gmt begin GMT_App_O_5 + gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+f8p -GX@App_O_cross.txt -S10 -T+lLH gmt end show diff --git a/doc/scripts/GMT_App_O_6.ps b/doc/scripts/GMT_App_O_6.ps index 3849d0bf9a1..384acf6d8c0 100644 Binary files a/doc/scripts/GMT_App_O_6.ps and b/doc/scripts/GMT_App_O_6.ps differ diff --git a/doc/scripts/GMT_App_O_6.sh b/doc/scripts/GMT_App_O_6.sh index 0ace0ecc8fc..8fe8d157470 100755 --- a/doc/scripts/GMT_App_O_6.sh +++ b/doc/scripts/GMT_App_O_6.sh @@ -3,6 +3,7 @@ # Makes Fig 6 for Appendix O (labeled lines) # gmt begin GMT_App_O_6 + gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+f8p -Gl50/10S/160/10S -S10 -T+l gmt plot -SqD1000k:+g+LD+an+p -Wthick @App_O_transect.txt diff --git a/doc/scripts/GMT_App_O_7.ps b/doc/scripts/GMT_App_O_7.ps index 02d5c89fff8..37a68d8f29c 100644 Binary files a/doc/scripts/GMT_App_O_7.ps and b/doc/scripts/GMT_App_O_7.ps differ diff --git a/doc/scripts/GMT_App_O_7.sh b/doc/scripts/GMT_App_O_7.sh index 8d2e9691d46..12a051ccf5d 100755 --- a/doc/scripts/GMT_App_O_7.sh +++ b/doc/scripts/GMT_App_O_7.sh @@ -3,6 +3,7 @@ # Makes Fig 7 for Appendix O (labeled lines) # gmt begin GMT_App_O_7 + gmt set GMT_THEME cookbook gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+u" m"+f8p -Gl50/10S/160/10S -S10 -T+l gmt plot -SqD15d:+gblack+fwhite+Ld+o+u@. -Wthick @App_O_transect.txt diff --git a/doc/scripts/GMT_App_O_8.ps b/doc/scripts/GMT_App_O_8.ps index a1e92faabff..4d16749f025 100644 Binary files a/doc/scripts/GMT_App_O_8.ps and b/doc/scripts/GMT_App_O_8.ps differ diff --git a/doc/scripts/GMT_App_O_8.sh b/doc/scripts/GMT_App_O_8.sh index 65f07233cdc..6105dbac883 100755 --- a/doc/scripts/GMT_App_O_8.sh +++ b/doc/scripts/GMT_App_O_8.sh @@ -3,6 +3,7 @@ # Makes Fig 8 for Appendix O (labeled lines) # gmt begin GMT_App_O_8 + gmt set GMT_THEME cookbook gmt convert -i0,1,4 -Em150 @App_O_transect.txt | $AWK '{print $1,$2,int($3)}' > fix2.txt gmt coast -R50/160/-15/15 -JM5.3i -Gburlywood -Sazure -A500 gmt grdcontour @App_O_geoid.nc -B20f10 -BWSne -C10 -A20+d+u" m"+f8p -Gl50/10S/160/10S -S10 -T+l diff --git a/doc/scripts/GMT_App_O_9.ps b/doc/scripts/GMT_App_O_9.ps index 4063b354aa6..3f22255d4a5 100644 Binary files a/doc/scripts/GMT_App_O_9.ps and b/doc/scripts/GMT_App_O_9.ps differ diff --git a/doc/scripts/GMT_App_O_9.sh b/doc/scripts/GMT_App_O_9.sh index 1fa564ae31f..1dda6af2a27 100755 --- a/doc/scripts/GMT_App_O_9.sh +++ b/doc/scripts/GMT_App_O_9.sh @@ -3,6 +3,7 @@ # Makes Fig 9 for Appendix O (labeled lines) # gmt begin GMT_App_O_9 +gmt set GMT_THEME cookbook R=-R-85/5/10/55 gmt grdgradient @earth_relief_05m_g $R -Nt1 -A45 -Gtopo5_int.nc gmt set FORMAT_GEO_MAP ddd:mm:ssF FONT_ANNOT_PRIMARY +9p FONT_TITLE 22p diff --git a/doc/scripts/GMT_CPTscale.ps b/doc/scripts/GMT_CPTscale.ps index 77094b71bc5..f7852bdff20 100644 Binary files a/doc/scripts/GMT_CPTscale.ps and b/doc/scripts/GMT_CPTscale.ps differ diff --git a/doc/scripts/GMT_CPTscale.sh b/doc/scripts/GMT_CPTscale.sh index 0e6236ee4e9..febad353161 100755 --- a/doc/scripts/GMT_CPTscale.sh +++ b/doc/scripts/GMT_CPTscale.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_CPTscale + gmt set GMT_THEME cookbook gmt plot -R0/6/0/6 -Jx1i -W0.25p << EOF > Normal scaling of whole CPT 3 2.9 diff --git a/doc/scripts/GMT_Defaults_1a.ps b/doc/scripts/GMT_Defaults_1a.ps index ef0af7bff29..b7004ba8f14 100644 Binary files a/doc/scripts/GMT_Defaults_1a.ps and b/doc/scripts/GMT_Defaults_1a.ps differ diff --git a/doc/scripts/GMT_Defaults_1a.sh b/doc/scripts/GMT_Defaults_1a.sh index d486b997135..cfe10438c4b 100755 --- a/doc/scripts/GMT_Defaults_1a.sh +++ b/doc/scripts/GMT_Defaults_1a.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_Defaults_1a + gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE fancy FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0.1i FONT_ANNOT_PRIMARY +8p gmt basemap -X2i -R-60/-30/-10/10 -JM2.25i -Ba10f5g5 -BWSne+t"Plot Title" gmt text -N -F+f7p,Helvetica-Bold,blue+j << EOF diff --git a/doc/scripts/GMT_Defaults_1b.ps b/doc/scripts/GMT_Defaults_1b.ps index bd4cca43f93..d77e8261c3a 100644 Binary files a/doc/scripts/GMT_Defaults_1b.ps and b/doc/scripts/GMT_Defaults_1b.ps differ diff --git a/doc/scripts/GMT_Defaults_1b.sh b/doc/scripts/GMT_Defaults_1b.sh index 7d881b146f8..20659afded9 100755 --- a/doc/scripts/GMT_Defaults_1b.sh +++ b/doc/scripts/GMT_Defaults_1b.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash gmt begin GMT_Defaults_1b + gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE plain FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0i \ - FONT_ANNOT_PRIMARY +8p MAP_ANNOT_OBLIQUE anywhere + FONT_ANNOT_PRIMARY +8p MAP_ANNOT_OBLIQUE anywhere MAP_FRAME_AXES=WESN gmt basemap -X1.5i -R-90/20/-55/25r -JOc-80/25.5/2/69/2.25i -Ba10f5g5 gmt text -R0/2.25/0/2 -Jx1i -N -F+f7p,Helvetica-Bold,blue+j << EOF -0.15 0.15 RB MAP_ORIGIN_X diff --git a/doc/scripts/GMT_Defaults_1c.ps b/doc/scripts/GMT_Defaults_1c.ps index b0b4531aa0e..5af5a74f78f 100644 Binary files a/doc/scripts/GMT_Defaults_1c.ps and b/doc/scripts/GMT_Defaults_1c.ps differ diff --git a/doc/scripts/GMT_Defaults_1c.sh b/doc/scripts/GMT_Defaults_1c.sh index be6520eb589..77e8582b970 100755 --- a/doc/scripts/GMT_Defaults_1c.sh +++ b/doc/scripts/GMT_Defaults_1c.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_Defaults_1c + gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE plain FORMAT_DATE_MAP "o dd" FORMAT_CLOCK_MAP hh FONT_ANNOT_PRIMARY +8p gmt basemap -R2001-9-11T/2001-9-13T/0.01/100 -JX2.25iT/2.25il -Bpxa6Hf1hg6h+l"x-axis label" -Bpya1g3p+l"y-axis label" -BWSne \ -X2i -Bsxa1D -U"Dazed and Confused"+o-0.75i/-0.85i --GMT_LANGUAGE=pt \ diff --git a/doc/scripts/GMT_SRTM.ps b/doc/scripts/GMT_SRTM.ps index a42c3ef70a8..8b995033cdf 100644 Binary files a/doc/scripts/GMT_SRTM.ps and b/doc/scripts/GMT_SRTM.ps differ diff --git a/doc/scripts/GMT_SRTM.sh b/doc/scripts/GMT_SRTM.sh index 1387e585d78..788f40915ec 100755 --- a/doc/scripts/GMT_SRTM.sh +++ b/doc/scripts/GMT_SRTM.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Show distribution of SRTM tiles gmt begin GMT_SRTM + gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE plain gmt coast -R-180/180/-60/60 -JQ0/15c -B -BWStr -Dc -A5000 -Glightgray --FORMAT_GEO_MAP=dddF echo "1 red" > t.cpt diff --git a/doc/scripts/GMT_TM.sh b/doc/scripts/GMT_TM.sh index cec771acda9..e8b861fe769 100755 --- a/doc/scripts/GMT_TM.sh +++ b/doc/scripts/GMT_TM.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R0/360/-80/80 -JT330/-45/10c -Ba30g -BWSne -Dc -A2000 -Slightblue -G0 -ps GMT_TM +gmt coast -R0/360/-80/80 -JT330/-45/10c -Ba30g -BWSne -Dc -A2000 -Slightblue -G0 --MAP_ANNOT_OBLIQUE=lon_horizontal --GMT_THEME=cookbook -ps GMT_TM diff --git a/doc/scripts/GMT_agefig.sh b/doc/scripts/GMT_agefig.sh index 4432519b1be..fe68506e36b 100755 --- a/doc/scripts/GMT_agefig.sh +++ b/doc/scripts/GMT_agefig.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Makes crustal age map for doc/rst/source/datasets/earth-age.rst gmt begin GMT_agefig ps + gmt set GMT_THEME cookbook gmt set MAP_TICK_LENGTH 2p MAP_ANNOT_OFFSET 2p MAP_FRAME_PEN 0.5p gmt grdimage @earth_age_06m -JQ180/6i -C@age_chrons_GTS2012_2020.cpt -B0 --MAP_FRAME_PEN=1p gmt colorbar -C@age_chrons_GTS2012_2020.cpt -G0/164.70 -Dn0.015/0.055+jBL+w5.8i/0.12c+h -S+c --FONT_ANNOT_PRIMARY=5p -F+gwhite+c0p/1p/2p/8p+pfaint diff --git a/doc/scripts/GMT_albers.ps b/doc/scripts/GMT_albers.ps index 18ce9b589fd..19ab62d6011 100644 Binary files a/doc/scripts/GMT_albers.ps and b/doc/scripts/GMT_albers.ps differ diff --git a/doc/scripts/GMT_albers.sh b/doc/scripts/GMT_albers.sh index 9a0df1f10b9..71b5bbb8a26 100755 --- a/doc/scripts/GMT_albers.sh +++ b/doc/scripts/GMT_albers.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_albers + gmt set GMT_THEME cookbook gmt set MAP_GRID_CROSS_SIZE_PRIMARY 0 gmt coast -R110/140/20/35 -JB125/20/25/45/12c -Bag -Dl -Ggreen -Wthinnest -A250 gmt end show diff --git a/doc/scripts/GMT_anchor.ps b/doc/scripts/GMT_anchor.ps index 1bb328e588a..cc3397238dc 100644 Binary files a/doc/scripts/GMT_anchor.ps and b/doc/scripts/GMT_anchor.ps differ diff --git a/doc/scripts/GMT_anchor.sh b/doc/scripts/GMT_anchor.sh index 0db4a8a90b7..5946fd7091a 100755 --- a/doc/scripts/GMT_anchor.sh +++ b/doc/scripts/GMT_anchor.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_anchor + gmt set GMT_THEME cookbook gmt basemap -R0/1/0/1 -JX5i/2i -Ba1f0.5 -BwSnE+gbisque gmt inset begin -DjTL+o0.7i/0.5i+w1.5i/0.75i -F+glightgreen+p1p gmt inset end diff --git a/doc/scripts/GMT_arrows.ps b/doc/scripts/GMT_arrows.ps index 00f5b13e5e0..5735d334290 100644 Binary files a/doc/scripts/GMT_arrows.ps and b/doc/scripts/GMT_arrows.ps differ diff --git a/doc/scripts/GMT_arrows.sh b/doc/scripts/GMT_arrows.sh index 3520410b2ed..09ca1fc4c6f 100755 --- a/doc/scripts/GMT_arrows.sh +++ b/doc/scripts/GMT_arrows.sh @@ -2,6 +2,7 @@ # # Demonstrate how arrows look like gmt begin GMT_arrows +gmt set GMT_THEME cookbook # Cartesian straight arrows gmt plot -R0/5/0/5 -JX1.75i -S -W1.5p -Gred -B0 --MAP_VECTOR_SHAPE=0.5 << EOF 0.5 0.5 4.5 0.5 v0.2i+s diff --git a/doc/scripts/GMT_arrows_types.ps b/doc/scripts/GMT_arrows_types.ps index 1b688d44e10..880149fd53b 100644 Binary files a/doc/scripts/GMT_arrows_types.ps and b/doc/scripts/GMT_arrows_types.ps differ diff --git a/doc/scripts/GMT_arrows_types.sh b/doc/scripts/GMT_arrows_types.sh index 97705218102..add7dc589f5 100755 --- a/doc/scripts/GMT_arrows_types.sh +++ b/doc/scripts/GMT_arrows_types.sh @@ -2,6 +2,7 @@ # # Demonstrate how arrows heads can look like (just doing Cartesian arrows here) gmt begin GMT_arrows_types +gmt set GMT_THEME cookbook # Cartesian straight arrows gmt plot -R0/10/0/7 -JX5.75i/1.75i -S -W1.5p -Gred -B0 --MAP_VECTOR_SHAPE=0 << EOF 0.5 0.5 4.5 0.5 v0.25i+s+e+a40 diff --git a/doc/scripts/GMT_atan.ps b/doc/scripts/GMT_atan.ps index af044724c85..c2fc89da428 100644 Binary files a/doc/scripts/GMT_atan.ps and b/doc/scripts/GMT_atan.ps differ diff --git a/doc/scripts/GMT_atan.sh b/doc/scripts/GMT_atan.sh index 8a1cebf9173..8aeb9f66aaa 100755 --- a/doc/scripts/GMT_atan.sh +++ b/doc/scripts/GMT_atan.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash gmt begin GMT_atan + gmt set GMT_THEME cookbook gmt grdgradient -A45 @earth_relief_30s -R-108/-103/35/40 -N -fg -Gtt.t.nc gmt grd2xyz -Z tt.t.nc > tt.d gmt histogram tt.d -R-0.75/0.75/0/20 -JX1.5i/1i -Bx0.5 -By5f5 -BWSne -W0.01 -Gblack -Z1 - gmt text -F+f9p+jLB << EOF + gmt text -F+f9p,Helvetica+jLB << EOF -0.7 17 Raw -0.7 15 slopes EOF @@ -25,7 +26,7 @@ EOF gmt grdgradient -A45 @tut_relief.nc -Nt -fg -Gtt.tt.nc gmt grd2xyz -Z tt.tt.nc > tt.d gmt histogram tt.d -R-0.75/0.75/0/5 -Bx0.5 -By2f1 -BWSne -W0.01 -Gblack -X1.85i -Z1 - gmt text -F+f9p+jLB << EOF + gmt text -F+f9p,Helvetica+jLB << EOF -0.7 4.3 tan@+-1@+ -0.7 3.7 transformed EOF diff --git a/doc/scripts/GMT_autolegend.ps b/doc/scripts/GMT_autolegend.ps index a5c2bfaa2e0..432acdc1531 100644 Binary files a/doc/scripts/GMT_autolegend.ps and b/doc/scripts/GMT_autolegend.ps differ diff --git a/doc/scripts/GMT_autolegend.sh b/doc/scripts/GMT_autolegend.sh index d91fd6bb3b0..b1cf8197e17 100755 --- a/doc/scripts/GMT_autolegend.sh +++ b/doc/scripts/GMT_autolegend.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_autolegend + gmt set GMT_THEME cookbook gmt plot -R0/7.2/3/7.2 -Jx2c @Table_5_11.txt -Sc0.35c -Glightgreen -Wfaint -lApples+H"LEGEND"+f16p+D gmt plot @Table_5_11.txt -St0.35c -Gorange -B -BWStr -lOranges gmt legend -DjTR+w3c+o0.25c -F+p1p+ggray95+s diff --git a/doc/scripts/GMT_az_equidistant.sh b/doc/scripts/GMT_az_equidistant.sh index 972cfb76927..ba407e29e28 100755 --- a/doc/scripts/GMT_az_equidistant.sh +++ b/doc/scripts/GMT_az_equidistant.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JE-100/40/12c -Bg -Dc -A10000 -Glightgray -Wthinnest -ps GMT_az_equidistant +gmt coast -Rg -JE-100/40/12c -Bg -Dc -A10000 -Glightgray -Wthinnest --GMT_THEME=cookbook -ps GMT_az_equidistant diff --git a/doc/scripts/GMT_base_symbols5.sh b/doc/scripts/GMT_base_symbols5.sh index ce3664d577d..ed5d9503f98 100755 --- a/doc/scripts/GMT_base_symbols5.sh +++ b/doc/scripts/GMT_base_symbols5.sh @@ -2,6 +2,7 @@ # # Demonstrate a few arrows gmt begin GMT_base_symbols5 ps +gmt set GMT_THEME cookbook # Cartesian straight arrows gmt plot -R0/5/0/5 -JX1.75i -S -W2p -Gred --MAP_VECTOR_SHAPE=0.5 << EOF 0.5 1.0 4.5 2.5 v0.3i+s+e+bi diff --git a/doc/scripts/GMT_bezier.sh b/doc/scripts/GMT_bezier.sh index ae2872c4754..7c324c73f17 100755 --- a/doc/scripts/GMT_bezier.sh +++ b/doc/scripts/GMT_bezier.sh @@ -8,6 +8,7 @@ cat << EOF > line.txt EOF gmt begin GMT_bezier + gmt set GMT_THEME cookbook gmt plot line.txt -R-0.25/4.25/-0.2/2.2 -JX3i/1.25i -W2p gmt plot line.txt -Sc0.1i -Gred -Wfaint gmt plot line.txt -W2p+s -X3i diff --git a/doc/scripts/GMT_cap.sh b/doc/scripts/GMT_cap.sh index f5b449187ff..aa69e4bc3e2 100755 --- a/doc/scripts/GMT_cap.sh +++ b/doc/scripts/GMT_cap.sh @@ -3,6 +3,7 @@ # Demonstrate the different line caps in PostScript # gmt begin GMT_cap ps + gmt set GMT_THEME cookbook cat <<-EOF > butt.txt 30 50 170 50 diff --git a/doc/scripts/GMT_cassini.sh b/doc/scripts/GMT_cassini.sh index 5a3f7a07cc4..89ece8284af 100755 --- a/doc/scripts/GMT_cassini.sh +++ b/doc/scripts/GMT_cassini.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R7:30/38:30/10:30/41:30+r -JC8.75/40/6c -Bafg -LjBR+c40+w100+f+o0.4c/0.5c -Dh -Gspringgreen -Sazure -Wthinnest -Ia/thinner --FONT_LABEL=10p -ps GMT_cassini +gmt coast -R7:30/38:30/10:30/41:30+r -JC8.75/40/6c -Bafg -LjBR+c40+w100+f+o0.4c/0.5c -Dh -Gspringgreen -Sazure -Wthinnest -Ia/thinner --GMT_THEME=cookbook --FONT_LABEL=10p -ps GMT_cassini diff --git a/doc/scripts/GMT_chunking.ps b/doc/scripts/GMT_chunking.ps index 54287991e8b..352ec794049 100644 Binary files a/doc/scripts/GMT_chunking.ps and b/doc/scripts/GMT_chunking.ps differ diff --git a/doc/scripts/GMT_chunking.sh b/doc/scripts/GMT_chunking.sh index 7389b42618c..511a82477e6 100755 --- a/doc/scripts/GMT_chunking.sh +++ b/doc/scripts/GMT_chunking.sh @@ -4,6 +4,7 @@ # gmt begin GMT_chunking +gmt set GMT_THEME cookbook gmt set MAP_FRAME_PEN thick FONT_ANNOT_PRIMARY 9p n=1 # current cell number diff --git a/doc/scripts/GMT_cmyk.ps b/doc/scripts/GMT_cmyk.ps index 0654ebdf51a..a85ab614949 100644 Binary files a/doc/scripts/GMT_cmyk.ps and b/doc/scripts/GMT_cmyk.ps differ diff --git a/doc/scripts/GMT_cmyk.sh b/doc/scripts/GMT_cmyk.sh index 9c0c9aae52a..cbe26b03f93 100755 --- a/doc/scripts/GMT_cmyk.sh +++ b/doc/scripts/GMT_cmyk.sh @@ -11,6 +11,7 @@ gmt project -N -Z2.6+e -G0.02 -C5.75/1.3 > C.d gmt project -N -Z2.6+e -G0.02 -C5/0 > Y.d gmt begin GMT_cmyk ps + gmt set GMT_THEME cookbook gmt plot -R-2.25/7.25/-1.8/2.75 -Jx0.6i R.d -Gred -B0 gmt plot G.d -Ggreen gmt plot B.d -Gblue diff --git a/doc/scripts/GMT_color_interpolate.ps b/doc/scripts/GMT_color_interpolate.ps index a95cfcc07f9..dc802b84507 100644 Binary files a/doc/scripts/GMT_color_interpolate.ps and b/doc/scripts/GMT_color_interpolate.ps differ diff --git a/doc/scripts/GMT_color_interpolate.sh b/doc/scripts/GMT_color_interpolate.sh index 4d487bb182b..f342c8bbe31 100755 --- a/doc/scripts/GMT_color_interpolate.sh +++ b/doc/scripts/GMT_color_interpolate.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_color_interpolate + gmt set GMT_THEME cookbook gmt basemap -Jx1i -R0/6.8/0/2.0 -B0 # Plot polar color map in the left; right (top) and wrong (bottom) diff --git a/doc/scripts/GMT_colorbar.ps b/doc/scripts/GMT_colorbar.ps index 9aa1b7fc919..04e9c693c93 100644 Binary files a/doc/scripts/GMT_colorbar.ps and b/doc/scripts/GMT_colorbar.ps differ diff --git a/doc/scripts/GMT_colorbar.sh b/doc/scripts/GMT_colorbar.sh index a0225759205..977a7c4a33b 100755 --- a/doc/scripts/GMT_colorbar.sh +++ b/doc/scripts/GMT_colorbar.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_colorbar + gmt set GMT_THEME cookbook gmt makecpt -T-15/15 -Cpolar gmt basemap -R0/20/0/1 -JM5i -BWse -B gmt colorbar -C -Bx+u"@." -By+l@~D@~T -DJBC+e diff --git a/doc/scripts/GMT_colorlist.ps b/doc/scripts/GMT_colorlist.ps index 7c5cb00b806..73f68f17931 100644 Binary files a/doc/scripts/GMT_colorlist.ps and b/doc/scripts/GMT_colorlist.ps differ diff --git a/doc/scripts/GMT_colorlist.sh b/doc/scripts/GMT_colorlist.sh index 994c731cbe0..1170ca399cf 100755 --- a/doc/scripts/GMT_colorlist.sh +++ b/doc/scripts/GMT_colorlist.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Illustrate 4 ways to build a CPT form a list of colors gmt begin GMT_colorlist + gmt set GMT_THEME cookbook gmt makecpt -T0,2,6 -Cred,yellow,purple -Z gmt colorbar -R0/4/0/4 -Jx1i -C -Bx -By+l"d)" -Dx0/0+w5i/0.2i+h+mu echo "5.1 0 -T0,2,6 -Cred,yellow,purple -Z" | gmt text -F+f12p+jLB -N diff --git a/doc/scripts/GMT_coverlogo.sh b/doc/scripts/GMT_coverlogo.sh index 3a349950221..ba61fb5823b 100755 --- a/doc/scripts/GMT_coverlogo.sh +++ b/doc/scripts/GMT_coverlogo.sh @@ -4,4 +4,4 @@ # # Logo is 5.458" wide and 2.729" high and origin is lower left # -gmt logo -Dx0/0+w5.458i -X0 -Y0 -ps GMT_coverlogo +gmt logo -Dx0/0+w5.458i -X0 -Y0 --GMT_THEME=cookbook -ps GMT_coverlogo diff --git a/doc/scripts/GMT_cycle_1.ps b/doc/scripts/GMT_cycle_1.ps index 088d7f8fb90..8d2f0f1cb2f 100644 Binary files a/doc/scripts/GMT_cycle_1.ps and b/doc/scripts/GMT_cycle_1.ps differ diff --git a/doc/scripts/GMT_cycle_1.sh b/doc/scripts/GMT_cycle_1.sh index 4cc5fb88a2e..23bfa27376c 100755 --- a/doc/scripts/GMT_cycle_1.sh +++ b/doc/scripts/GMT_cycle_1.sh @@ -2,5 +2,6 @@ # Demonstration of -w through a series of cycle plots # This one shows the initial time series (no -w yet) gmt begin GMT_cycle_1 + gmt set GMT_THEME cookbook gmt plot @mississippi.txt -JX15cT/7c -Bxaf -Byaf+l"10@+3@+ m@+3@+/s" -BWSrt+t"Mississippi river daily discharge" -W0.25p,red -i0,1+s1e-3 gmt end show diff --git a/doc/scripts/GMT_cycle_2.ps b/doc/scripts/GMT_cycle_2.ps index 24349aba029..17161eef041 100644 Binary files a/doc/scripts/GMT_cycle_2.ps and b/doc/scripts/GMT_cycle_2.ps differ diff --git a/doc/scripts/GMT_cycle_2.sh b/doc/scripts/GMT_cycle_2.sh index 7dd9d44e226..96691a47098 100755 --- a/doc/scripts/GMT_cycle_2.sh +++ b/doc/scripts/GMT_cycle_2.sh @@ -2,5 +2,6 @@ # Demonstration of -w through a series of cycle plots # This one shows how to wrap yearly and show data on a normalized year gmt begin GMT_cycle_2 + gmt set GMT_THEME cookbook gmt plot @mississippi.txt -R0/1/0/50 -JX15c/7c -W0.25p,red -Bxaf -Byaf+l"10@+3@+ m@+3@+/s" -BWSrt+t"Mississippi river annual discharge" -i0,1+s1e-3 -wy gmt end show diff --git a/doc/scripts/GMT_cycle_3.ps b/doc/scripts/GMT_cycle_3.ps index 7b071a17b8a..cdbed91142d 100644 Binary files a/doc/scripts/GMT_cycle_3.ps and b/doc/scripts/GMT_cycle_3.ps differ diff --git a/doc/scripts/GMT_cycle_3.sh b/doc/scripts/GMT_cycle_3.sh index 414280ccb90..1ef48d0412c 100755 --- a/doc/scripts/GMT_cycle_3.sh +++ b/doc/scripts/GMT_cycle_3.sh @@ -2,5 +2,6 @@ # Demonstration of -w through a series of cycle plots # This one shows how to wrap annual time and make a histogram gmt begin GMT_cycle_3 + gmt set GMT_THEME cookbook gmt histogram @mississippi.txt -R-3/9/0/8 -JX15c/7c -T1 -Gred -W1p -Bxaf -Byaf+l"10@+6@+ m@+3@+/s" -BWSrt+t"Average monthly discharge" -Z0+w -i0,1+s1e-6 -wa gmt end show diff --git a/doc/scripts/GMT_cycle_4.ps b/doc/scripts/GMT_cycle_4.ps index eda65dbe02b..a15dc2b00f7 100644 Binary files a/doc/scripts/GMT_cycle_4.ps and b/doc/scripts/GMT_cycle_4.ps differ diff --git a/doc/scripts/GMT_cycle_4.sh b/doc/scripts/GMT_cycle_4.sh index 05e0dd11d74..2e8115bcb94 100755 --- a/doc/scripts/GMT_cycle_4.sh +++ b/doc/scripts/GMT_cycle_4.sh @@ -2,6 +2,7 @@ # Demonstration of -w through a series of cycle plots # This one shows how to apply wrapping to the y-coordinate gmt begin GMT_cycle_4 + gmt set GMT_THEME cookbook gmt subplot begin 1x2 -Fs8c/10c -BWSrt -T"Mississippi river annual discharge" -A+jTR gmt plot @mississippi.txt -i1+s1e-3,0 -R0/50/0/1 -W0.25p,blue -Byaf+l"Normalized year" -Bxaf+l"10@+3@+ m@+3@+/s" -wy+c1 -c gmt histogram @mississippi.txt -R-3/9/0/8 -T1 -Gblue -W1p -Bxaf -Byaf+l"10@+6@+ m@+3@+/s" -Z0+w -i0,1+s1e-6 -A -wa -c --FORMAT_TIME_PRIMARY_MAP=a diff --git a/doc/scripts/GMT_cycle_5.ps b/doc/scripts/GMT_cycle_5.ps index a87a50c9474..542b21bdafa 100644 Binary files a/doc/scripts/GMT_cycle_5.ps and b/doc/scripts/GMT_cycle_5.ps differ diff --git a/doc/scripts/GMT_cycle_5.sh b/doc/scripts/GMT_cycle_5.sh index f249f69cc3b..4679a4a20ae 100755 --- a/doc/scripts/GMT_cycle_5.sh +++ b/doc/scripts/GMT_cycle_5.sh @@ -2,7 +2,8 @@ # Demonstration of -w through a series of cycle plots # This one shows how to wrap data and grid and make a quick image gmt begin GMT_cycle_5 + gmt set GMT_THEME cookbook gmt xyz2grd @mississippi.txt -i0,1+s1e-3,1+s1e-3 -wy -R0/1/0/50 -I50+n -r -Gtmp.grd gmt grdimage tmp.grd -JX15c/8c -BWSen -Bxaf+l"Normalized year" -Byaf+l"Discharge (10@+3@+ m@+3@+/s)" - gmt colorbar -DJRM + gmt colorbar -DJRM -Baf gmt end show diff --git a/doc/scripts/GMT_cycle_6.ps b/doc/scripts/GMT_cycle_6.ps index 5103789f15a..6e8e1ee8af5 100644 Binary files a/doc/scripts/GMT_cycle_6.ps and b/doc/scripts/GMT_cycle_6.ps differ diff --git a/doc/scripts/GMT_cycle_6.sh b/doc/scripts/GMT_cycle_6.sh index c86515eca75..6c0866e3ff5 100755 --- a/doc/scripts/GMT_cycle_6.sh +++ b/doc/scripts/GMT_cycle_6.sh @@ -3,6 +3,7 @@ # First just show data, with gaps > 6 hours not connected # Notice May 2018 spikes, data gaps in the summer of 2018, Covid drop. gmt begin GMT_cycle_6 + gmt set GMT_THEME cookbook gmt set TIME_WEEK_START Monday gmt subplot begin 2x2 -Fs15c/8c -M14p/6p -A -T"Verrazzano-Narrows Bridge @%34%\337@%% Brooklyn Traffic [2018-2020]" -BWSrt # Raw time-series diff --git a/doc/scripts/GMT_cyclic.ps b/doc/scripts/GMT_cyclic.ps index 0e6a2983a1d..27e93556ee2 100644 Binary files a/doc/scripts/GMT_cyclic.ps and b/doc/scripts/GMT_cyclic.ps differ diff --git a/doc/scripts/GMT_cyclic.sh b/doc/scripts/GMT_cyclic.sh index 21291f86059..a5bfd0d9a78 100755 --- a/doc/scripts/GMT_cyclic.sh +++ b/doc/scripts/GMT_cyclic.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_cyclic + gmt set GMT_THEME cookbook gmt makecpt -T0/100 -Cjet -Ww gmt basemap -R0/20/0/1 -JM5i -BWse -B gmt colorbar -C -B -DJBC diff --git a/doc/scripts/GMT_dir_rose.ps b/doc/scripts/GMT_dir_rose.ps index 9a22b8f99d6..ba22dbd0a6b 100644 Binary files a/doc/scripts/GMT_dir_rose.ps and b/doc/scripts/GMT_dir_rose.ps differ diff --git a/doc/scripts/GMT_dir_rose.sh b/doc/scripts/GMT_dir_rose.sh index cbb3ea0cd85..4f0a655609c 100755 --- a/doc/scripts/GMT_dir_rose.sh +++ b/doc/scripts/GMT_dir_rose.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash # Showing map directional roses gmt begin GMT_dir_rose - gmt set FONT_LABEL 10p FONT_TITLE 12p MAP_ANNOT_OBLIQUE lon_horizontal,lat_parallel MAP_TITLE_OFFSET 5p \ - MAP_FRAME_WIDTH 3p FORMAT_GEO_MAP dddF FONT_ANNOT_PRIMARY 10p + gmt set GMT_THEME cookbook + gmt set FONT_LABEL 10p FONT_TITLE 12p MAP_ANNOT_OBLIQUE lon_horizontal,lat_parallel + gmt set MAP_TITLE_OFFSET 5p MAP_FRAME_WIDTH 3p FORMAT_GEO_MAP dddF FONT_ANNOT_PRIMARY 10p # left: Fancy kind = 1 gmt basemap -R-5/5/-5/5 -Jm0.15i -Ba5f -BWSne+gazure1 -Tdg0/0+w1i+jCM -X1i # middle: Fancy kind = 3 diff --git a/doc/scripts/GMT_earthmask.ps b/doc/scripts/GMT_earthmask.ps index b424eedd33c..32ff03ed54c 100644 Binary files a/doc/scripts/GMT_earthmask.ps and b/doc/scripts/GMT_earthmask.ps differ diff --git a/doc/scripts/GMT_earthmask.sh b/doc/scripts/GMT_earthmask.sh index 45eced9c41d..3e5b93ba2f2 100755 --- a/doc/scripts/GMT_earthmask.sh +++ b/doc/scripts/GMT_earthmask.sh @@ -3,6 +3,7 @@ # Plot the earth masks gmt begin GMT_earthmask ps + gmt set GMT_THEME cookbook gmt makecpt -Clightblue,burlywood,blue,red,white -T-0.5/4.5/1 -N gmt grdimage @earth_mask_05m -JQ0/15c -Baf -BWsNe gmt legend -DJBC+w15c+o0/0.5c -F+p1p <<- EOF diff --git a/doc/scripts/GMT_eckert4.sh b/doc/scripts/GMT_eckert4.sh index 2f6aa68c873..9c3ac57a94b 100755 --- a/doc/scripts/GMT_eckert4.sh +++ b/doc/scripts/GMT_eckert4.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JKf12c -Bg -Dc -A10000 -Wthinnest -Givory -Sbisque3 -ps GMT_eckert4 +gmt coast -Rg -JKf12c -Bg -Dc -A10000 -Wthinnest -Givory -Sbisque3 --GMT_THEME=cookbook -ps GMT_eckert4 diff --git a/doc/scripts/GMT_eckert6.ps b/doc/scripts/GMT_eckert6.ps index 35d7c45cd89..80d6494b03c 100644 Binary files a/doc/scripts/GMT_eckert6.ps and b/doc/scripts/GMT_eckert6.ps differ diff --git a/doc/scripts/GMT_eckert6.sh b/doc/scripts/GMT_eckert6.sh index 7969ac3a0a8..eb376833ecb 100755 --- a/doc/scripts/GMT_eckert6.sh +++ b/doc/scripts/GMT_eckert6.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_eckert6 + gmt set GMT_THEME cookbook gmt coast -Rg -JKs4.5i -Bg -Dc -A10000 -Wthinnest -Givory -Sbisque3 gmt end show diff --git a/doc/scripts/GMT_encoding.sh b/doc/scripts/GMT_encoding.sh index b54aa491ab3..4ed881cf4e7 100755 --- a/doc/scripts/GMT_encoding.sh +++ b/doc/scripts/GMT_encoding.sh @@ -55,6 +55,7 @@ BEGIN { EOF gmt begin GMT_encoding +gmt set GMT_THEME cookbook gmt set PS_CHAR_ENCODING $1 gmt plot -R0/9/-1/32 -Jx0.345i/-0.21i -Bg1 -B+t"Octal codes for $1" -Ggray -X3i -Sri tt.empty $AWK -f tt.awk tt.chart | gmt text -F+f10p,Times-Roman diff --git a/doc/scripts/GMT_equi_cyl.sh b/doc/scripts/GMT_equi_cyl.sh index e30b78f1343..5cbc500c6b0 100755 --- a/doc/scripts/GMT_equi_cyl.sh +++ b/doc/scripts/GMT_equi_cyl.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JQ12c -B60f30g30 -Dc -A5000 -Gtan4 -Slightcyan -ps GMT_equi_cyl +gmt coast -Rg -JQ12c -B60f30g30 -Dc -A5000 -Gtan4 -Slightcyan --GMT_THEME=cookbook -ps GMT_equi_cyl diff --git a/doc/scripts/GMT_equidistant_conic.ps b/doc/scripts/GMT_equidistant_conic.ps index 58c081916ae..890ee5f890c 100644 Binary files a/doc/scripts/GMT_equidistant_conic.ps and b/doc/scripts/GMT_equidistant_conic.ps differ diff --git a/doc/scripts/GMT_equidistant_conic.sh b/doc/scripts/GMT_equidistant_conic.sh index b73dc3c24d0..12479c7647e 100755 --- a/doc/scripts/GMT_equidistant_conic.sh +++ b/doc/scripts/GMT_equidistant_conic.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_equidistant_conic + gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0.15c gmt coast -R-88/-70/18/24 -JD-79/21/19/23/12c -Bag -Di -N1/thick,red -Glightgreen -Wthinnest gmt end show diff --git a/doc/scripts/GMT_fatline.sh b/doc/scripts/GMT_fatline.sh index 3e70021e015..8ce52aa20e2 100755 --- a/doc/scripts/GMT_fatline.sh +++ b/doc/scripts/GMT_fatline.sh @@ -7,6 +7,7 @@ cat > gc.d << END -8 85 END gmt begin GMT_fatline + gmt set GMT_THEME cookbook gmt plot -R-90/82/0/87+r -JM-45/84.5/2.5i -W30p gc.d gmt plot -W1p,red gc.d gmt plot -X3.25i -W30p gc.d --PS_LINE_CAP=round --PS_LINE_JOIN=round diff --git a/doc/scripts/GMT_gall_stereo.ps b/doc/scripts/GMT_gall_stereo.ps index 57754071026..68e2cc27d31 100644 Binary files a/doc/scripts/GMT_gall_stereo.ps and b/doc/scripts/GMT_gall_stereo.ps differ diff --git a/doc/scripts/GMT_gall_stereo.sh b/doc/scripts/GMT_gall_stereo.sh index 9c5ec1486a3..4960633ca97 100755 --- a/doc/scripts/GMT_gall_stereo.sh +++ b/doc/scripts/GMT_gall_stereo.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_gall_stereo + gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP dddA gmt coast -R-180/180/-60/80 -JCyl_stere/0/45/12c -Bxa60f30g30 -Bya30g30 -Dc -A5000 -Wblack -Gseashell4 -Santiquewhite1 gmt end show diff --git a/doc/scripts/GMT_general_cyl.sh b/doc/scripts/GMT_general_cyl.sh index 19b4ef34334..8421e6cdddd 100755 --- a/doc/scripts/GMT_general_cyl.sh +++ b/doc/scripts/GMT_general_cyl.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R-145/215/-90/90 -JY35/30/12c -B45g45 -Dc -A10000 -Sdodgerblue -Wthinnest --MAP_FRAME_TYPE=fancy-rounded -ps GMT_general_cyl +gmt coast -R-145/215/-90/90 -JY35/30/12c -B45g45 -Dc -A10000 -Sdodgerblue -Wthinnest --GMT_THEME=cookbook --MAP_FRAME_TYPE=fancy-rounded -ps GMT_general_cyl diff --git a/doc/scripts/GMT_gnomonic.sh b/doc/scripts/GMT_gnomonic.sh index 89413ff0e16..31c3ab5b394 100755 --- a/doc/scripts/GMT_gnomonic.sh +++ b/doc/scripts/GMT_gnomonic.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JF-120/35/60/12c -B30g15 -Dc -A10000 -Gtan -Scyan -Wthinnest -ps GMT_gnomonic +gmt coast -Rg -JF-120/35/60/12c -B30g15 -Dc -A10000 -Gtan -Scyan -Wthinnest --GMT_THEME=cookbook -ps GMT_gnomonic diff --git a/doc/scripts/GMT_grid2pix.ps b/doc/scripts/GMT_grid2pix.ps index adcc848ae8a..a69ebfd9fd4 100644 Binary files a/doc/scripts/GMT_grid2pix.ps and b/doc/scripts/GMT_grid2pix.ps differ diff --git a/doc/scripts/GMT_grid2pix.sh b/doc/scripts/GMT_grid2pix.sh index ba3c72c2ecc..4ee69bc3402 100755 --- a/doc/scripts/GMT_grid2pix.sh +++ b/doc/scripts/GMT_grid2pix.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Illustrate the problem with grdsample -T gmt begin GMT_grid2pix ps + gmt set GMT_THEME cookbook gmt subplot begin 2x1 -F6i/2.5i -M3p -A+jTR+o-0.2i/0 gmt subplot set 0 gmt math -T0/7/0.02 T PI MUL COS = | gmt plot -R0/6.7/-1.5/1.7 -W2p -Bx1 -By0g10 -BWS --MAP_FRAME_TYPE=graph --MAP_GRID_PEN_PRIMARY=0.25p,- diff --git a/doc/scripts/GMT_grinten.sh b/doc/scripts/GMT_grinten.sh index 2a6fafe0d20..b8949e54892 100755 --- a/doc/scripts/GMT_grinten.sh +++ b/doc/scripts/GMT_grinten.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JV10c -Bg -Dc -Glightgray -Scornsilk -A10000 -Wthinnest -ps GMT_grinten +gmt coast -Rg -JV10c -Bg -Dc -Glightgray -Scornsilk -A10000 -Wthinnest --GMT_THEME=cookbook -ps GMT_grinten diff --git a/doc/scripts/GMT_hammer.sh b/doc/scripts/GMT_hammer.sh index f08b72d774a..8b63b5f0a9a 100755 --- a/doc/scripts/GMT_hammer.sh +++ b/doc/scripts/GMT_hammer.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JH12c -Bg -Dc -A10000 -Gblack -Scornsilk -ps GMT_hammer +gmt coast -Rg -JH12c -Bg -Dc -A10000 -Gblack -Scornsilk --GMT_THEME=cookbook -ps GMT_hammer diff --git a/doc/scripts/GMT_hinge.ps b/doc/scripts/GMT_hinge.ps index 2e6472da4d5..14edd56a866 100644 Binary files a/doc/scripts/GMT_hinge.ps and b/doc/scripts/GMT_hinge.ps differ diff --git a/doc/scripts/GMT_hinge.sh b/doc/scripts/GMT_hinge.sh index 040f6d51f8f..b87cc079a29 100755 --- a/doc/scripts/GMT_hinge.sh +++ b/doc/scripts/GMT_hinge.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_hinge + gmt set GMT_THEME cookbook gmt makecpt -Cglobe -T-8000/3000 gmt colorbar -B -Dx0/0+w4.5i/0.1i+h -W0.001 gmt colorbar -Cglobe -B -Dx0/0+w4.5i/0.1i+h -W0.001 -Y0.5i diff --git a/doc/scripts/GMT_images.ps b/doc/scripts/GMT_images.ps index 48e164cd5ec..50c3c344d05 100644 Binary files a/doc/scripts/GMT_images.ps and b/doc/scripts/GMT_images.ps differ diff --git a/doc/scripts/GMT_images.sh b/doc/scripts/GMT_images.sh index 2088ed4204f..f899f5230d2 100755 --- a/doc/scripts/GMT_images.sh +++ b/doc/scripts/GMT_images.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_images + gmt set GMT_THEME cookbook gmt image @nsf1.jpg -R0/2/0/1 -JX5i/1.6i -B0 -DjML+w1.5i+o0.1i/0i gmt image @soest.eps -DjMR+o0.1i/0i+w2i gmt end show diff --git a/doc/scripts/GMT_inset.ps b/doc/scripts/GMT_inset.ps index 27e11d87e49..eacfe234790 100644 Binary files a/doc/scripts/GMT_inset.ps and b/doc/scripts/GMT_inset.ps differ diff --git a/doc/scripts/GMT_inset.sh b/doc/scripts/GMT_inset.sh index b705b826e35..db7f944867a 100755 --- a/doc/scripts/GMT_inset.sh +++ b/doc/scripts/GMT_inset.sh @@ -4,6 +4,7 @@ gmt begin GMT_inset # Bottom map of Australia + gmt set GMT_THEME cookbook gmt coast -R110E/170E/44S/9S -JM6i -B -BWSne -Wfaint -N2/1p -EAU+gbisque -Gbrown -Sazure1 -Da -Xc --FORMAT_GEO_MAP=dddF gmt inset begin -DjTR+w1.5i+o0.15i -F+gwhite+p1p+s -M0.05i gmt coast -Rg -JG120/30S/ -Da -Gbrown -A5000 -Bg -Wfaint -EAU+gbisque diff --git a/doc/scripts/GMT_joint.sh b/doc/scripts/GMT_joint.sh index 0acf56c172a..14ce0ae1ef4 100755 --- a/doc/scripts/GMT_joint.sh +++ b/doc/scripts/GMT_joint.sh @@ -3,6 +3,7 @@ # Demonstrate the different line joints in PostScript # gmt begin GMT_joint ps + gmt set GMT_THEME cookbook cat <<-EOF > round.txt 1 1 8 2 diff --git a/doc/scripts/GMT_lambert_az_hemi.sh b/doc/scripts/GMT_lambert_az_hemi.sh index da5c1cd4a47..06d66f69391 100755 --- a/doc/scripts/GMT_lambert_az_hemi.sh +++ b/doc/scripts/GMT_lambert_az_hemi.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JA280/30/12c -Bg -Dc -A1000 -Gnavy -ps GMT_lambert_az_hemi +gmt coast -Rg -JA280/30/12c -Bg -Dc -A1000 -Gnavy --GMT_THEME=cookbook -ps GMT_lambert_az_hemi diff --git a/doc/scripts/GMT_lambert_az_rect.ps b/doc/scripts/GMT_lambert_az_rect.ps index e3f11322018..ec67c1ebb20 100644 Binary files a/doc/scripts/GMT_lambert_az_rect.ps and b/doc/scripts/GMT_lambert_az_rect.ps differ diff --git a/doc/scripts/GMT_lambert_az_rect.sh b/doc/scripts/GMT_lambert_az_rect.sh index b6982530879..d85a48c9b53 100755 --- a/doc/scripts/GMT_lambert_az_rect.sh +++ b/doc/scripts/GMT_lambert_az_rect.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_lambert_az_rect + gmt set GMT_THEME cookbook gmt set FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0 gmt coast -R0/-40/60/-10+r -JA30/-30/12c -Bag -Dl -A500 -Gp10+r300 -Wthinnest gmt end show diff --git a/doc/scripts/GMT_lambert_conic.ps b/doc/scripts/GMT_lambert_conic.ps index ef6133139d5..9c792133d8b 100644 Binary files a/doc/scripts/GMT_lambert_conic.ps and b/doc/scripts/GMT_lambert_conic.ps differ diff --git a/doc/scripts/GMT_lambert_conic.sh b/doc/scripts/GMT_lambert_conic.sh index 1061c279923..113b9200dc6 100755 --- a/doc/scripts/GMT_lambert_conic.sh +++ b/doc/scripts/GMT_lambert_conic.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_lambert_conic + gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE FANCY FORMAT_GEO_MAP ddd:mm:ssF MAP_GRID_CROSS_SIZE_PRIMARY 0.15c gmt coast -R-130/-70/24/52 -Jl-100/35/33/45/1:50000000 -Bag -Dl -N1/thick,red -N2/thinner -A500 -Gtan -Wthinnest,white -Sblue gmt end show diff --git a/doc/scripts/GMT_latex.ps b/doc/scripts/GMT_latex.ps index d487442a502..9df07b00e6c 100644 Binary files a/doc/scripts/GMT_latex.ps and b/doc/scripts/GMT_latex.ps differ diff --git a/doc/scripts/GMT_latex.sh b/doc/scripts/GMT_latex.sh index 3ed69fac51e..6a5cb95d696 100755 --- a/doc/scripts/GMT_latex.sh +++ b/doc/scripts/GMT_latex.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_latex ps + gmt set GMT_THEME cookbook gmt basemap -R-200/200/0/2 -JX15c -Bxaf+l"@[\nabla^4 \psi - \Delta \sigma_{xx}^2@[ (MPa)" -BS gmt end show diff --git a/doc/scripts/GMT_legend.ps b/doc/scripts/GMT_legend.ps index 32b1e920cad..bb2b7efd6ca 100644 Binary files a/doc/scripts/GMT_legend.ps and b/doc/scripts/GMT_legend.ps differ diff --git a/doc/scripts/GMT_legend.sh b/doc/scripts/GMT_legend.sh index d58f3555761..e04eb037913 100755 --- a/doc/scripts/GMT_legend.sh +++ b/doc/scripts/GMT_legend.sh @@ -3,8 +3,7 @@ # Testing gmt legend capabilities for tables with colors gmt begin GMT_legend -gmt set FONT_ANNOT_PRIMARY 12p FONT_LABEL 12p - +gmt set GMT_THEME cookbook cat < table.txt #G 0.04i H 24 Times-Roman Eight Largest Cities in North America @@ -91,7 +90,7 @@ T Many of these cities have hosted World Cup Soccer (WC) and some T have hosted the Olympics (OL). The rest is just some basic information T about each city, such as climate and population. Of course, this is all T an excuse to demonstrate variable-width tables and row coloring. -#G 0.1i +G 0.15i EOF cat << EOF > t.cpt 1 red @@ -103,6 +102,6 @@ cat << EOF > t.cpt 7 magenta 8 white EOF -gmt legend -Dx0/0+w5.6i+jBL+l1.2 -C0.05i -F+p+gsnow1 -B0 table.txt --FONT_ANNOT_PRIMARY=12p --FONT_LABEL=12p +gmt legend -Dx0/0+w5.6i+jBL+l1.2 -C0.05i -F+p+gsnow1 -B0 table.txt --FONT_LABEL=12p rm -f table.txt t.cpt gmt end show diff --git a/doc/scripts/GMT_linear.ps b/doc/scripts/GMT_linear.ps index b6c0360dd4b..bb19438abe0 100644 Binary files a/doc/scripts/GMT_linear.ps and b/doc/scripts/GMT_linear.ps differ diff --git a/doc/scripts/GMT_linear.sh b/doc/scripts/GMT_linear.sh index 61841387cf7..6c00d242cef 100755 --- a/doc/scripts/GMT_linear.sh +++ b/doc/scripts/GMT_linear.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_linear + gmt set GMT_THEME cookbook gmt plot -R0/100/0/10 -JX8c/4c -Bag -BWSne+gsnow -Wthick,blue,- sqrt.txt gmt plot -St0.3c -N -Gred -Wfaint sqrt10.txt gmt end show diff --git a/doc/scripts/GMT_linear_cal.ps b/doc/scripts/GMT_linear_cal.ps index 03aaebee9ea..4dd8697fdfd 100644 Binary files a/doc/scripts/GMT_linear_cal.ps and b/doc/scripts/GMT_linear_cal.ps differ diff --git a/doc/scripts/GMT_linear_cal.sh b/doc/scripts/GMT_linear_cal.sh index 70e2357cff1..90979cee9d1 100755 --- a/doc/scripts/GMT_linear_cal.sh +++ b/doc/scripts/GMT_linear_cal.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_linear_cal + gmt set GMT_THEME cookbook gmt set FORMAT_DATE_MAP o TIME_WEEK_START Sunday FORMAT_CLOCK_MAP=-hham FORMAT_TIME_PRIMARY_MAP full gmt basemap -R2001-9-24T/2001-9-29T/T07:0/T15:0 -JX10c/-5c -Bxa1Kf1kg1d -Bya1Hg1h -BWsNe+glightyellow gmt end show diff --git a/doc/scripts/GMT_linear_d.ps b/doc/scripts/GMT_linear_d.ps index 50b6912ab36..39a93008413 100644 Binary files a/doc/scripts/GMT_linear_d.ps and b/doc/scripts/GMT_linear_d.ps differ diff --git a/doc/scripts/GMT_linear_d.sh b/doc/scripts/GMT_linear_d.sh index 06383271980..85ee826775c 100755 --- a/doc/scripts/GMT_linear_d.sh +++ b/doc/scripts/GMT_linear_d.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_linear_d + gmt set GMT_THEME cookbook gmt set MAP_GRID_CROSS_SIZE_PRIMARY 0.1i MAP_FRAME_TYPE FANCY FORMAT_GEO_MAP ddd:mm:ssF gmt coast -Rg-55/305/-90/90 -Jx0.04c -Bagf -BWSen -Dc -A1000 -Glightbrown -Wthinnest -Slightblue gmt end show diff --git a/doc/scripts/GMT_linearrow.ps b/doc/scripts/GMT_linearrow.ps index 9c776a341f5..47c872a40f2 100644 Binary files a/doc/scripts/GMT_linearrow.ps and b/doc/scripts/GMT_linearrow.ps differ diff --git a/doc/scripts/GMT_linearrow.sh b/doc/scripts/GMT_linearrow.sh index 1b46863a460..78ea962cc6d 100755 --- a/doc/scripts/GMT_linearrow.sh +++ b/doc/scripts/GMT_linearrow.sh @@ -2,6 +2,7 @@ gmt math -T10/30/1 T 20 SUB 10 DIV 2 POW 41.5 ADD = line.txt gmt begin GMT_linearrow + gmt set GMT_THEME cookbook gmt plot line.txt -R8/32/40/44 -JM5i -Wfaint,red -Bxaf -Bya2f1 -BWSne --MAP_FRAME_TYPE=plain gmt plot line.txt -W2p+o1c/500k+vb0.2i+gred+pfaint+bc+ve0.3i+gblue+h0.5 gmt end show diff --git a/doc/scripts/GMT_linecap.sh b/doc/scripts/GMT_linecap.sh index 285dd9eaa36..a420284214c 100755 --- a/doc/scripts/GMT_linecap.sh +++ b/doc/scripts/GMT_linecap.sh @@ -5,6 +5,7 @@ cat << EOF > lines.txt EOF gmt begin GMT_linecap + gmt set GMT_THEME cookbook gmt plot lines.txt -R-0.25/5.25/-0.2/1.4 -Jx1i -W4p gmt plot lines.txt -Y0.2i -W4p,orange,. gmt plot lines.txt -Y0.2i -W4p,red,9_4_2_4:2p diff --git a/doc/scripts/GMT_lineoffset.ps b/doc/scripts/GMT_lineoffset.ps index 9f77b400632..f73cbbb1d8e 100644 Binary files a/doc/scripts/GMT_lineoffset.ps and b/doc/scripts/GMT_lineoffset.ps differ diff --git a/doc/scripts/GMT_lineoffset.sh b/doc/scripts/GMT_lineoffset.sh index f6f779f5953..2dbdfb6978d 100755 --- a/doc/scripts/GMT_lineoffset.sh +++ b/doc/scripts/GMT_lineoffset.sh @@ -2,6 +2,7 @@ gmt math -T10/30/1 T 20 SUB 10 DIV 2 POW 41.5 ADD = line.txt gmt begin GMT_lineoffset + gmt set GMT_THEME cookbook gmt plot line.txt -R8/32/40/44 -JM5i -Wfaint,red -Bxaf -Bya2f1 -BWSne --MAP_FRAME_TYPE=plain gmt plot line.txt -W2p+o1c/500k gmt text -F+f10p+jCM+a << EOF diff --git a/doc/scripts/GMT_log.ps b/doc/scripts/GMT_log.ps index 7aa0e04a975..588813ee297 100644 Binary files a/doc/scripts/GMT_log.ps and b/doc/scripts/GMT_log.ps differ diff --git a/doc/scripts/GMT_log.sh b/doc/scripts/GMT_log.sh index 1e80bf1919d..97aa95a0ad1 100755 --- a/doc/scripts/GMT_log.sh +++ b/doc/scripts/GMT_log.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_log + gmt set GMT_THEME cookbook gmt plot -R1/100/0/10 -Jx4cl/0.4c -Bx2g3 -Bya2f1g2 -BWSne+gbisque -Wthick,blue,- -h sqrt.txt gmt plot -Ss0.3c -N -Gred -W -h sqrt10.txt gmt end show diff --git a/doc/scripts/GMT_mag_rose.ps b/doc/scripts/GMT_mag_rose.ps index 9f3d747ed88..7cab1eff1fb 100644 Binary files a/doc/scripts/GMT_mag_rose.ps and b/doc/scripts/GMT_mag_rose.ps differ diff --git a/doc/scripts/GMT_mag_rose.sh b/doc/scripts/GMT_mag_rose.sh index 783ea539be3..13ab694e6f1 100755 --- a/doc/scripts/GMT_mag_rose.sh +++ b/doc/scripts/GMT_mag_rose.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_mag_rose + gmt set GMT_THEME cookbook # Magnetic rose with a specified declination gmt basemap -R-10/-2/12.8812380332/0.661018975345+r -JOc0/0/50/60/7i -B -BWSne -X1.25i --MAP_ANNOT_OBLIQUE=lon_horizontal,lat_parallel --FONT_ANNOT_PRIMARY=12p gmt basemap -Tmg-2/0.5+w2.5i+d-14.5+t45/10/5+i0.25p,blue+p0.25p,red+l+jCM \ diff --git a/doc/scripts/GMT_map_frame_type.ps b/doc/scripts/GMT_map_frame_type.ps index 6da76ca6961..e2be5c69f44 100644 Binary files a/doc/scripts/GMT_map_frame_type.ps and b/doc/scripts/GMT_map_frame_type.ps differ diff --git a/doc/scripts/GMT_map_frame_type.sh b/doc/scripts/GMT_map_frame_type.sh index a67d0d097e0..33e959a8929 100755 --- a/doc/scripts/GMT_map_frame_type.sh +++ b/doc/scripts/GMT_map_frame_type.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash gmt begin GMT_map_frame_type + gmt set GMT_THEME cookbook gmt set FONT_TITLE 18p - gmt subplot begin 1x5 -Fs3.5c/3.5c -M0.2c -R0/10/0/10 + gmt subplot begin 1x5 -Fs3.5c/3.5c -M0.4c -R0/10/0/10 gmt basemap -JM? -Baf -BWSen+t"fancy" -c --MAP_FRAME_TYPE=fancy gmt basemap -JM? -Baf -BWSen+t"fancy+" -c --MAP_FRAME_TYPE=fancy+ gmt basemap -JM? -Baf -BWSen+t"plain" -c --MAP_FRAME_TYPE=plain diff --git a/doc/scripts/GMT_mapscale.ps b/doc/scripts/GMT_mapscale.ps index 2e4d7a0cbdf..7f8eec10c18 100644 Binary files a/doc/scripts/GMT_mapscale.ps and b/doc/scripts/GMT_mapscale.ps differ diff --git a/doc/scripts/GMT_mapscale.sh b/doc/scripts/GMT_mapscale.sh index ed05050fd01..b2987837bfb 100755 --- a/doc/scripts/GMT_mapscale.sh +++ b/doc/scripts/GMT_mapscale.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_mapscale + gmt set GMT_THEME cookbook gmt basemap -R0/40/50/56 -JM5i -B -LjML+c53+w1000k+f+l"Scale at 53@.N" -F+glightcyan+c0+p gmt basemap -LjBR+c53+w1000k+l+f -F+p1p+i+gwhite+c0.1i h=$(gmt mapproject -Wh -Di) diff --git a/doc/scripts/GMT_mercator.ps b/doc/scripts/GMT_mercator.ps index 8e847bd599d..56e66c8cbe2 100644 Binary files a/doc/scripts/GMT_mercator.ps and b/doc/scripts/GMT_mercator.ps differ diff --git a/doc/scripts/GMT_mercator.sh b/doc/scripts/GMT_mercator.sh index bab66cd6b0a..159ca32ac1e 100755 --- a/doc/scripts/GMT_mercator.sh +++ b/doc/scripts/GMT_mercator.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_mercator + gmt set GMT_THEME cookbook gmt set MAP_FRAME_TYPE fancy-rounded gmt coast -R0/360/-70/70 -Jm0.03c -Bxa60f15 -Bya30f15 -Dc -A5000 -Gred gmt end show \ No newline at end of file diff --git a/doc/scripts/GMT_miller.sh b/doc/scripts/GMT_miller.sh index 1a090a14627..0fba95ac760 100755 --- a/doc/scripts/GMT_miller.sh +++ b/doc/scripts/GMT_miller.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R-90/270/-80/90 -Jj1:400000000 -Bx45g45 -By30g30 -Dc -A10000 -Gkhaki -Wthinnest -Sazure -ps GMT_miller +gmt coast -R-90/270/-80/90 -Jj1:400000000 -Bx45g45 -By30g30 -Dc -A10000 -Gkhaki -Wthinnest -Sazure --GMT_THEME=cookbook -ps GMT_miller diff --git a/doc/scripts/GMT_misfit.sh b/doc/scripts/GMT_misfit.sh index 85c300a6a36..9bd6a8f2dda 100755 --- a/doc/scripts/GMT_misfit.sh +++ b/doc/scripts/GMT_misfit.sh @@ -18,6 +18,7 @@ xa=$(gmt math -Q $x 0.4 ADD =) a1=$(gmt math -Q $angle 180 ADD =) a2=$(gmt math -Q $angle 270 ADD =) gmt begin GMT_misfit ps + gmt set GMT_THEME cookbook gmt plot -R1/6/0/3 -Jx2c -Glightgreen@35 <<- EOF $x 1 4.5 1 diff --git a/doc/scripts/GMT_mollweide.sh b/doc/scripts/GMT_mollweide.sh index a62311ebca2..bc2891bfb8c 100755 --- a/doc/scripts/GMT_mollweide.sh +++ b/doc/scripts/GMT_mollweide.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rd -JW12c -Bg -Dc -A10000 -Gtomato1 -Sskyblue -ps GMT_mollweide +gmt coast -Rd -JW12c -Bg -Dc -A10000 -Gtomato1 -Sskyblue --GMT_THEME=cookbook -ps GMT_mollweide diff --git a/doc/scripts/GMT_movie_canvas.sh b/doc/scripts/GMT_movie_canvas.sh index 3a19e3c446c..61d27ed338c 100755 --- a/doc/scripts/GMT_movie_canvas.sh +++ b/doc/scripts/GMT_movie_canvas.sh @@ -3,6 +3,7 @@ # Makes a plot of the general movie dimensions # gmt begin GMT_movie_canvas ps + gmt set GMT_THEME cookbook gmt basemap -R0/24/0/13.5 -Jx1c -B0 gmt plot -W0.5p,- <<- EOF > diff --git a/doc/scripts/GMT_movie_progress.ps b/doc/scripts/GMT_movie_progress.ps index 84156b060cc..1d79ac24925 100644 Binary files a/doc/scripts/GMT_movie_progress.ps and b/doc/scripts/GMT_movie_progress.ps differ diff --git a/doc/scripts/GMT_movie_progress.sh b/doc/scripts/GMT_movie_progress.sh index 6e4b6cf2e38..4472a387a9c 100755 --- a/doc/scripts/GMT_movie_progress.sh +++ b/doc/scripts/GMT_movie_progress.sh @@ -5,6 +5,7 @@ # Make dummy map script for static "movie" cat << EOF > map.sh gmt begin + gmt set GMT_THEME cookbook gmt basemap -R0/10/0/5 -JX7.6i/3.4i -Bafg -BWSrt+gbeige gmt end EOF diff --git a/doc/scripts/GMT_nearneighbor.ps b/doc/scripts/GMT_nearneighbor.ps index 6a04a8759cc..1e14c34fec4 100644 Binary files a/doc/scripts/GMT_nearneighbor.ps and b/doc/scripts/GMT_nearneighbor.ps differ diff --git a/doc/scripts/GMT_nearneighbor.sh b/doc/scripts/GMT_nearneighbor.sh index e237a69e6b6..e79bdc2252a 100755 --- a/doc/scripts/GMT_nearneighbor.sh +++ b/doc/scripts/GMT_nearneighbor.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_nearneighbor ps +gmt set GMT_THEME cookbook gmt plot -R0/2/0/2 -Jx2i -Sc2i -Wthick -Glightgreen@70 -Bg0.25 << EOF 0.75 1.25 EOF diff --git a/doc/scripts/GMT_obl_baja.ps b/doc/scripts/GMT_obl_baja.ps index b01ba7f6a38..a1c11570537 100644 Binary files a/doc/scripts/GMT_obl_baja.ps and b/doc/scripts/GMT_obl_baja.ps differ diff --git a/doc/scripts/GMT_obl_baja.sh b/doc/scripts/GMT_obl_baja.sh index 843ca27ec75..72560328f1c 100755 --- a/doc/scripts/GMT_obl_baja.sh +++ b/doc/scripts/GMT_obl_baja.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Oblique Mercator map for Baja California with oblique Equator along y-axis gmt begin GMT_obl_baja + gmt set GMT_THEME cookbook gmt set MAP_ANNOT_OBLIQUE lon_horizontal,lat_horizontal,tick_extend gmt coast -R122W/35N/107W/22N+r -JOa120W/25N/-30/6c+v -Gsienna -Ba5g5 -B+f -N1/1p -EUS+gburlywood -Smintcream -TdjBL+w0.5i+l gmt end show diff --git a/doc/scripts/GMT_obl_merc.ps b/doc/scripts/GMT_obl_merc.ps index ab1f7565db9..bafb3940446 100644 Binary files a/doc/scripts/GMT_obl_merc.ps and b/doc/scripts/GMT_obl_merc.ps differ diff --git a/doc/scripts/GMT_obl_merc.sh b/doc/scripts/GMT_obl_merc.sh index 0411a32e1ec..818e3782a8d 100755 --- a/doc/scripts/GMT_obl_merc.sh +++ b/doc/scripts/GMT_obl_merc.sh @@ -1,2 +1,6 @@ #!/usr/bin/env bash -gmt coast -R270/20/305/25+r -JOc280/25.5/22/69/12c -Bag -Di -A250 -Gburlywood -Wthinnest -TdjTR+w1c+f2+l+o0.4c -Sazure --FONT_TITLE=8p --MAP_TITLE_OFFSET=4p -ps GMT_obl_merc +gmt begin GMT_obl_merc + gmt set GMT_THEME cookbook + gmt coast -R270/20/305/25+r -JOc280/25.5/22/69/12c -Bag -Di -A250 -Gburlywood -Wthinnest -TdjTR+w1c+f2+l+o0.4c -Sazure --FONT_TITLE=8p --MAP_TITLE_OFFSET=4p +gmt end show + diff --git a/doc/scripts/GMT_obl_nz.ps b/doc/scripts/GMT_obl_nz.ps index fd9d8d66775..64e28d18b57 100644 Binary files a/doc/scripts/GMT_obl_nz.ps and b/doc/scripts/GMT_obl_nz.ps differ diff --git a/doc/scripts/GMT_obl_nz.sh b/doc/scripts/GMT_obl_nz.sh index 163a2fff1c8..ec6fb008880 100755 --- a/doc/scripts/GMT_obl_nz.sh +++ b/doc/scripts/GMT_obl_nz.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Oblique Mercator map for NZ using complementary poles gmt begin GMT_obl_nz +gmt set GMT_THEME cookbook lon=173:17:02E lat=41:16:15S az=35 diff --git a/doc/scripts/GMT_orthographic.sh b/doc/scripts/GMT_orthographic.sh index 4bfeecf59ce..32e424c3aee 100755 --- a/doc/scripts/GMT_orthographic.sh +++ b/doc/scripts/GMT_orthographic.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JG-75/41/12c -Bg -Dc -A5000 -Gpink -Sthistle -ps GMT_orthographic +gmt coast -Rg -JG-75/41/12c -Bg -Dc -A5000 -Gpink -Sthistle --GMT_THEME=cookbook -ps GMT_orthographic diff --git a/doc/scripts/GMT_panel.ps b/doc/scripts/GMT_panel.ps index 2523947f583..5df8fcf27a3 100644 Binary files a/doc/scripts/GMT_panel.ps and b/doc/scripts/GMT_panel.ps differ diff --git a/doc/scripts/GMT_panel.sh b/doc/scripts/GMT_panel.sh index 981e3255a93..6893f17ec63 100755 --- a/doc/scripts/GMT_panel.sh +++ b/doc/scripts/GMT_panel.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_panel + gmt set GMT_THEME cookbook gmt basemap -R0/2/0/1 -JX5i/2i -B0 gmt inset begin -DjTL+o0.2i+w1.75i/0.75i -F+glightgreen+r gmt inset end diff --git a/doc/scripts/GMT_perspective.sh b/doc/scripts/GMT_perspective.sh index c17872b4c91..dc54376759b 100755 --- a/doc/scripts/GMT_perspective.sh +++ b/doc/scripts/GMT_perspective.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rg -JG4/52/230/90/60/180/60/60/12c -Bx2g2 -By1g1 -Ia -Di -Glightbrown -Wthinnest -Slightblue --MAP_ANNOT_MIN_SPACING=0.6c -ps GMT_perspective +gmt coast -Rg -JG4/52/230/90/60/180/60/60/12c -Bx2g2 -By1g1 -Ia -Di -Glightbrown -Wthinnest -Slightblue --GMT_THEME=cookbook --MAP_ANNOT_MIN_SPACING=0.6c -ps GMT_perspective diff --git a/doc/scripts/GMT_polar.ps b/doc/scripts/GMT_polar.ps index 80dea6c710f..d33a18d4f9c 100644 Binary files a/doc/scripts/GMT_polar.ps and b/doc/scripts/GMT_polar.ps differ diff --git a/doc/scripts/GMT_polar.sh b/doc/scripts/GMT_polar.sh index f6a73160848..7897b24842d 100755 --- a/doc/scripts/GMT_polar.sh +++ b/doc/scripts/GMT_polar.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_polar + gmt set GMT_THEME cookbook gmt grdmath -R0/360/2/4 -I6/0.1 X 4 MUL PI MUL 180 DIV COS Y 2 POW MUL = tt.nc gmt grdcontour tt.nc -JP8c -B30 -BNs+ghoneydew -C2 -S4 --FORMAT_GEO_MAP=+ddd gmt end show diff --git a/doc/scripts/GMT_polyconic.sh b/doc/scripts/GMT_polyconic.sh index 859da2252b4..99298c10309 100755 --- a/doc/scripts/GMT_polyconic.sh +++ b/doc/scripts/GMT_polyconic.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R-180/-20/0/90 -JPoly/10c -Bx30g10 -By10g10 -Dc -A1000 -Glightgray -Wthinnest -ps GMT_polyconic +gmt coast -R-180/-20/0/90 -JPoly/10c -Bx30g10 -By10g10 -Dc -A1000 -Glightgray -Wthinnest --GMT_THEME=cookbook -ps GMT_polyconic diff --git a/doc/scripts/GMT_pow.ps b/doc/scripts/GMT_pow.ps index 977a4022883..059a3a79825 100644 Binary files a/doc/scripts/GMT_pow.ps and b/doc/scripts/GMT_pow.ps differ diff --git a/doc/scripts/GMT_pow.sh b/doc/scripts/GMT_pow.sh index 72c41cee980..760ef85217c 100755 --- a/doc/scripts/GMT_pow.sh +++ b/doc/scripts/GMT_pow.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_pow + gmt set GMT_THEME cookbook gmt plot -R0/100/0/10 -Jx0.75cp0.5/0.4c -Bxa1p -Bya2f1 -BWSne+givory -Wthick sqrt.txt gmt plot -Sc0.2c -Ggreen -W sqrt10.txt gmt end show diff --git a/doc/scripts/GMT_pstext_clearance.sh b/doc/scripts/GMT_pstext_clearance.sh index 00b49b073a4..37d4995157b 100755 --- a/doc/scripts/GMT_pstext_clearance.sh +++ b/doc/scripts/GMT_pstext_clearance.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_pstext_clearance +gmt set GMT_THEME cookbook gmt text -R0/3/-0.1/1.5 -Jx1i -C0.2i+tO -Wthick -F+f36p,Helvetica-Bold << EOF 1.5 0.5 My Text EOF diff --git a/doc/scripts/GMT_pstext_justify.sh b/doc/scripts/GMT_pstext_justify.sh index 53ff93da61d..95b107ad37d 100755 --- a/doc/scripts/GMT_pstext_justify.sh +++ b/doc/scripts/GMT_pstext_justify.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_pstext_justify +gmt set GMT_THEME cookbook B=0.2 M=0.38 T=0.56 diff --git a/doc/scripts/GMT_registration.ps b/doc/scripts/GMT_registration.ps index 84902bd88f3..91b0aa24fb2 100644 Binary files a/doc/scripts/GMT_registration.ps and b/doc/scripts/GMT_registration.ps differ diff --git a/doc/scripts/GMT_registration.sh b/doc/scripts/GMT_registration.sh index 464b623129c..ac8d0998b73 100755 --- a/doc/scripts/GMT_registration.sh +++ b/doc/scripts/GMT_registration.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_registration +gmt set GMT_THEME cookbook # Gridline registration gmt plot -R0/3/0/3 -JX2.5i/1.25i -B1g1 -Bwesn -Wthinner -L -Glightred << EOF 0.5 1.5 diff --git a/doc/scripts/GMT_robinson.sh b/doc/scripts/GMT_robinson.sh index 1b60f2075e8..7e5065882ff 100755 --- a/doc/scripts/GMT_robinson.sh +++ b/doc/scripts/GMT_robinson.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rd -JN12c -Bg -Dc -A10000 -Ggoldenrod -Ssnow2 -ps GMT_robinson +gmt coast -Rd -JN12c -Bg -Dc -A10000 -Ggoldenrod -Ssnow2 --GMT_THEME=cookbook -ps GMT_robinson diff --git a/doc/scripts/GMT_seamount_cum_inc.ps b/doc/scripts/GMT_seamount_cum_inc.ps index 35277fa726f..aaf0278d200 100644 Binary files a/doc/scripts/GMT_seamount_cum_inc.ps and b/doc/scripts/GMT_seamount_cum_inc.ps differ diff --git a/doc/scripts/GMT_seamount_cum_inc.sh b/doc/scripts/GMT_seamount_cum_inc.sh index 5d07805c49f..9a2feadfbdb 100755 --- a/doc/scripts/GMT_seamount_cum_inc.sh +++ b/doc/scripts/GMT_seamount_cum_inc.sh @@ -2,6 +2,7 @@ # Plot 5 life-stages in growing volcanoes in crossection # Using un-truncated Gaussian shapes with linear flux gmt begin GMT_seamount_cum_inc ps + gmt set GMT_THEME cookbook echo "100 75 50 5000 1 0" > t.txt gmt grdseamount -R40/160/74/76+uk -I100 -Gsmtc_%05.2f.nc t.txt -T0.8/0/0.2 -Qc/l -Dk -Cg -Mc.lis gmt grdseamount -R40/160/74/76+uk -I100 -Gsmti_%05.2f.nc t.txt -T0.8/0/0.2 -Qi/l -Dk -Cg -Mi.lis diff --git a/doc/scripts/GMT_seislegend.ps b/doc/scripts/GMT_seislegend.ps index f0254040bb0..f685442f520 100644 Binary files a/doc/scripts/GMT_seislegend.ps and b/doc/scripts/GMT_seislegend.ps differ diff --git a/doc/scripts/GMT_seislegend.sh b/doc/scripts/GMT_seislegend.sh index 9ee414767c6..86020552dab 100755 --- a/doc/scripts/GMT_seislegend.sh +++ b/doc/scripts/GMT_seislegend.sh @@ -3,6 +3,7 @@ # Show a basic seismicity legend # gmt begin GMT_seislegend ps + gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 10p FONT_TITLE 18p FORMAT_GEO_MAP ddd:mm:ssF # Create standard seismicity color table diff --git a/doc/scripts/GMT_sinus_int.ps b/doc/scripts/GMT_sinus_int.ps index cbd6653c709..e6c45fb04d1 100644 Binary files a/doc/scripts/GMT_sinus_int.ps and b/doc/scripts/GMT_sinus_int.ps differ diff --git a/doc/scripts/GMT_sinus_int.sh b/doc/scripts/GMT_sinus_int.sh index 121d92eba81..0ecc62e3531 100755 --- a/doc/scripts/GMT_sinus_int.sh +++ b/doc/scripts/GMT_sinus_int.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_sinus_int + gmt set GMT_THEME cookbook gmt coast -R200/340/-90/90 -Ji0.04c -Bg -A10000 -Dc -Gdarkred -Sazure gmt coast -R-20/60/-90/90 -Bg -Dc -A10000 -Gdarkgreen -Sazure -X5.6c gmt coast -R60/200/-90/90 -Bg -Dc -A10000 -Gdarkblue -Sazure -X3.2c diff --git a/doc/scripts/GMT_sinusoidal.sh b/doc/scripts/GMT_sinusoidal.sh index 67ed9a122c6..ac15a17c1e3 100755 --- a/doc/scripts/GMT_sinusoidal.sh +++ b/doc/scripts/GMT_sinusoidal.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rd -JI12c -Bg -Dc -A10000 -Gcoral4 -Sazure3 -ps GMT_sinusoidal +gmt coast -Rd -JI12c -Bg -Dc -A10000 -Gcoral4 -Sazure3 --GMT_THEME=cookbook -ps GMT_sinusoidal diff --git a/doc/scripts/GMT_slope2intensity.ps b/doc/scripts/GMT_slope2intensity.ps index 142390fb728..5a8532c1556 100644 Binary files a/doc/scripts/GMT_slope2intensity.ps and b/doc/scripts/GMT_slope2intensity.ps differ diff --git a/doc/scripts/GMT_slope2intensity.sh b/doc/scripts/GMT_slope2intensity.sh index e9252e4ab48..2c690ac9e39 100755 --- a/doc/scripts/GMT_slope2intensity.sh +++ b/doc/scripts/GMT_slope2intensity.sh @@ -28,6 +28,7 @@ cat << EOF >> t2.txt 0 0 EOF gmt begin GMT_slope2intensity ps + gmt set GMT_THEME cookbook gmt plot -R2/15/1.1/8.4 -Jx0.44444i -B0 t2.txt -Glightgreen -W0.25p gmt plot -Sv14p+e+jb+h0.5 -W1p,orange -Gorange -N <<- EOF 15 4 210 0.75i diff --git a/doc/scripts/GMT_stereographic_general.ps b/doc/scripts/GMT_stereographic_general.ps index d686d4c7044..89bb21a4830 100644 Binary files a/doc/scripts/GMT_stereographic_general.ps and b/doc/scripts/GMT_stereographic_general.ps differ diff --git a/doc/scripts/GMT_stereographic_general.sh b/doc/scripts/GMT_stereographic_general.sh index 9ef41746059..13cb2c1c599 100755 --- a/doc/scripts/GMT_stereographic_general.sh +++ b/doc/scripts/GMT_stereographic_general.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_stereographic_general + gmt set GMT_THEME cookbook gmt set MAP_ANNOT_OBLIQUE separate gmt coast -R100/-42/160/-8+r -JS130/-30/12c -Bag -Dl -A500 -Ggreen -Slightblue -Wthinnest gmt end show diff --git a/doc/scripts/GMT_stereographic_polar.sh b/doc/scripts/GMT_stereographic_polar.sh index 4327d5a7f2a..a0e266d42de 100755 --- a/doc/scripts/GMT_stereographic_polar.sh +++ b/doc/scripts/GMT_stereographic_polar.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R-30/30/60/72 -Js0/90/12c/60 -B10g -Dl -A250 -Groyalblue -Sseashell -ps GMT_stereographic_polar +gmt coast -R-30/30/60/72 -Js0/90/12c/60 -B10g -Dl -A250 -Groyalblue -Sseashell --GMT_THEME=cookbook -ps GMT_stereographic_polar diff --git a/doc/scripts/GMT_stereographic_rect.ps b/doc/scripts/GMT_stereographic_rect.ps index c4f2b1a5d97..6fc5e0d1694 100644 Binary files a/doc/scripts/GMT_stereographic_rect.ps and b/doc/scripts/GMT_stereographic_rect.ps differ diff --git a/doc/scripts/GMT_stereographic_rect.sh b/doc/scripts/GMT_stereographic_rect.sh index e51b642d65f..2551dbe95b4 100755 --- a/doc/scripts/GMT_stereographic_rect.sh +++ b/doc/scripts/GMT_stereographic_rect.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_stereographic_rect + gmt set GMT_THEME cookbook gmt set MAP_ANNOT_OBLIQUE lon_horizontal,lat_horizontal,tick_extend,tick_normal gmt coast -R-25/59/70/72+r -JS10/90/11c -B20g -Dl -A250 -Gdarkbrown -Wthinnest -Slightgray gmt end show diff --git a/doc/scripts/GMT_stereonets.ps b/doc/scripts/GMT_stereonets.ps index 4a48407f2b0..51c9399e7fc 100644 Binary files a/doc/scripts/GMT_stereonets.ps and b/doc/scripts/GMT_stereonets.ps differ diff --git a/doc/scripts/GMT_stereonets.sh b/doc/scripts/GMT_stereonets.sh index 2400a855eb3..049b9938612 100755 --- a/doc/scripts/GMT_stereonets.sh +++ b/doc/scripts/GMT_stereonets.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_stereonets + gmt set GMT_THEME cookbook gmt basemap -R0/360/-90/90 -JA0/0/1.75i -Bg15 echo "180 -90 SCHMIDT" | gmt text -N -D0/-0.2c -F+f12p,Helvetica-Bold+jTC gmt basemap -JS0/0/1.75i -Bg15 -X2.75i diff --git a/doc/scripts/GMT_title_fade.ps b/doc/scripts/GMT_title_fade.ps index f9e8f945e47..342169706c1 100644 Binary files a/doc/scripts/GMT_title_fade.ps and b/doc/scripts/GMT_title_fade.ps differ diff --git a/doc/scripts/GMT_title_fade.sh b/doc/scripts/GMT_title_fade.sh index 23be19ce068..ab5429106e8 100755 --- a/doc/scripts/GMT_title_fade.sh +++ b/doc/scripts/GMT_title_fade.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_title_fade + gmt set GMT_THEME cookbook cat <<- EOF > B.txt 0 afg 0 1 afg t@-i@- diff --git a/doc/scripts/GMT_transverse_merc.sh b/doc/scripts/GMT_transverse_merc.sh index 03ad4d7dde5..8d46fb876c7 100755 --- a/doc/scripts/GMT_transverse_merc.sh +++ b/doc/scripts/GMT_transverse_merc.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -R20/30/50/45+r -Jt35/0.5c -Bag -Dl -A250 -Glightbrown -Wthinnest -Sseashell -ps GMT_transverse_merc +gmt coast -R20/30/50/45+r -Jt35/0.5c -Bag -Dl -A250 -Glightbrown -Wthinnest -Sseashell --GMT_THEME=cookbook -ps GMT_transverse_merc diff --git a/doc/scripts/GMT_tut_1.ps b/doc/scripts/GMT_tut_1.ps index 631945f9772..0e1eb9bb2e4 100644 Binary files a/doc/scripts/GMT_tut_1.ps and b/doc/scripts/GMT_tut_1.ps differ diff --git a/doc/scripts/GMT_tut_1.sh b/doc/scripts/GMT_tut_1.sh index dff3e4e09e1..fe72d165b55 100755 --- a/doc/scripts/GMT_tut_1.sh +++ b/doc/scripts/GMT_tut_1.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_1 + gmt set GMT_THEME cookbook gmt basemap -R10/70/-3/8 -JX4i/3i -B -B+glightred+t"My first plot" gmt end show diff --git a/doc/scripts/GMT_tut_10.ps b/doc/scripts/GMT_tut_10.ps index 8462568bfe1..6bcef8f5321 100644 Binary files a/doc/scripts/GMT_tut_10.ps and b/doc/scripts/GMT_tut_10.ps differ diff --git a/doc/scripts/GMT_tut_10.sh b/doc/scripts/GMT_tut_10.sh index 78695bd17c9..aa9a7310672 100755 --- a/doc/scripts/GMT_tut_10.sh +++ b/doc/scripts/GMT_tut_10.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_10 + gmt set GMT_THEME cookbook gmt text -R0/7/0/5 -Jx1i -B -F+f30p,Times-Roman,DarkOrange+jBL << EOF 1 1 It's P@al, not Pal! 1 2 Try @%33%ZapfChancery@%% today diff --git a/doc/scripts/GMT_tut_11.ps b/doc/scripts/GMT_tut_11.ps index 12224a3918a..5c9b265018b 100644 Binary files a/doc/scripts/GMT_tut_11.ps and b/doc/scripts/GMT_tut_11.ps differ diff --git a/doc/scripts/GMT_tut_11.sh b/doc/scripts/GMT_tut_11.sh index a497773d7c2..e1b34de2f6e 100755 --- a/doc/scripts/GMT_tut_11.sh +++ b/doc/scripts/GMT_tut_11.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_11 + gmt set GMT_THEME cookbook gmt grdcontour @earth_relief_05m -R-66/-60/30/35 -JM6i -C250 -A1000 -B gmt end show diff --git a/doc/scripts/GMT_tut_12.ps b/doc/scripts/GMT_tut_12.ps index 81706535e19..321a9a45104 100644 Binary files a/doc/scripts/GMT_tut_12.ps and b/doc/scripts/GMT_tut_12.ps differ diff --git a/doc/scripts/GMT_tut_12.sh b/doc/scripts/GMT_tut_12.sh index d99065859de..416218c4bdc 100755 --- a/doc/scripts/GMT_tut_12.sh +++ b/doc/scripts/GMT_tut_12.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_12 + gmt set GMT_THEME cookbook gmt nearneighbor -R245/255/20/30 -I5m -S40k -Gship.nc @tut_ship.xyz gmt grdcontour ship.nc -JM6i -B -C250 -A1000 gmt end show diff --git a/doc/scripts/GMT_tut_13.ps b/doc/scripts/GMT_tut_13.ps index 6cf2c25af7a..a6be9a152d0 100644 Binary files a/doc/scripts/GMT_tut_13.ps and b/doc/scripts/GMT_tut_13.ps differ diff --git a/doc/scripts/GMT_tut_13.sh b/doc/scripts/GMT_tut_13.sh index 9460162d382..0abc38b4203 100755 --- a/doc/scripts/GMT_tut_13.sh +++ b/doc/scripts/GMT_tut_13.sh @@ -2,6 +2,7 @@ gmt blockmedian -R245/255/20/30 -I5m -V @tut_ship.xyz > ship_5m.xyz gmt surface ship_5m.xyz -R245/255/20/30 -I5m -Gship.nc gmt begin GMT_tut_13 + gmt set GMT_THEME cookbook gmt mask -R245/255/20/30 -I5m ship_5m.xyz -JM6i -B gmt grdcontour ship.nc -C250 -A1000 gmt mask -C diff --git a/doc/scripts/GMT_tut_14.ps b/doc/scripts/GMT_tut_14.ps index 760cff846a3..13bba39a01e 100644 Binary files a/doc/scripts/GMT_tut_14.ps and b/doc/scripts/GMT_tut_14.ps differ diff --git a/doc/scripts/GMT_tut_14.sh b/doc/scripts/GMT_tut_14.sh index a56e2af325d..710678da649 100755 --- a/doc/scripts/GMT_tut_14.sh +++ b/doc/scripts/GMT_tut_14.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_14 + gmt set GMT_THEME cookbook gmt makecpt -H -Crainbow -T-20/60/10 > disc.cpt gmt makecpt -H -Crainbow -T-20/60 > cont.cpt gmt basemap -R0/6/0/9 -Jx1i -B0 -Xc diff --git a/doc/scripts/GMT_tut_15.ps b/doc/scripts/GMT_tut_15.ps index 28ba5d00e45..4700c46bc82 100644 Binary files a/doc/scripts/GMT_tut_15.ps and b/doc/scripts/GMT_tut_15.ps differ diff --git a/doc/scripts/GMT_tut_15.sh b/doc/scripts/GMT_tut_15.sh index 258188099a0..ae3ce33020b 100755 --- a/doc/scripts/GMT_tut_15.sh +++ b/doc/scripts/GMT_tut_15.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_15 + gmt set GMT_THEME cookbook gmt makecpt -Crainbow -T1000/5000 gmt grdimage @earth_relief_30s -R-108/-103/35/40 -JM6i -B -BWSnE gmt colorbar -DJTC -I0.4 -Bxa -By+lm diff --git a/doc/scripts/GMT_tut_16.ps b/doc/scripts/GMT_tut_16.ps index 4bf50d652b6..887806afc69 100644 Binary files a/doc/scripts/GMT_tut_16.ps and b/doc/scripts/GMT_tut_16.ps differ diff --git a/doc/scripts/GMT_tut_16.sh b/doc/scripts/GMT_tut_16.sh index 2ef0b376247..8e2b1c238fd 100755 --- a/doc/scripts/GMT_tut_16.sh +++ b/doc/scripts/GMT_tut_16.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_16 + gmt set GMT_THEME cookbook gmt makecpt -Crainbow -T1000/5000 gmt grdcut @earth_relief_30s -R-108/-103/35/40 -Gtut_relief.nc gmt grdgradient tut_relief.nc -Ne0.8 -A100 -fg -Gus_i.nc diff --git a/doc/scripts/GMT_tut_17.ps b/doc/scripts/GMT_tut_17.ps index d5de993e0f2..9115fdde69b 100644 Binary files a/doc/scripts/GMT_tut_17.ps and b/doc/scripts/GMT_tut_17.ps differ diff --git a/doc/scripts/GMT_tut_17.sh b/doc/scripts/GMT_tut_17.sh index fc3ce159dee..47e6f4879e9 100755 --- a/doc/scripts/GMT_tut_17.sh +++ b/doc/scripts/GMT_tut_17.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_17 + gmt set GMT_THEME cookbook gmt makecpt -Cno_green -T-2/30/2 gmt grdimage -Rg -JW180/9i "@otemp.anal1deg.nc?otemp[2,0]" -Bag gmt end show diff --git a/doc/scripts/GMT_tut_18.ps b/doc/scripts/GMT_tut_18.ps index 357529cd748..b0c259b2df8 100644 Binary files a/doc/scripts/GMT_tut_18.ps and b/doc/scripts/GMT_tut_18.ps differ diff --git a/doc/scripts/GMT_tut_18.sh b/doc/scripts/GMT_tut_18.sh index 396a414ad52..40159c21705 100755 --- a/doc/scripts/GMT_tut_18.sh +++ b/doc/scripts/GMT_tut_18.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_18 + gmt set GMT_THEME cookbook gmt grdview @earth_relief_05m -R-66/-60/30/35 -JM5i -JZ2i -p135/30 -B gmt end show diff --git a/doc/scripts/GMT_tut_19.ps b/doc/scripts/GMT_tut_19.ps index 1b438c9d9ee..109aa4e1393 100644 Binary files a/doc/scripts/GMT_tut_19.ps and b/doc/scripts/GMT_tut_19.ps differ diff --git a/doc/scripts/GMT_tut_19.sh b/doc/scripts/GMT_tut_19.sh index 575682e8562..73b5c60d87e 100755 --- a/doc/scripts/GMT_tut_19.sh +++ b/doc/scripts/GMT_tut_19.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_19 + gmt set GMT_THEME cookbook gmt makecpt -Cdem2 -T1000/5000 gmt grdcut @earth_relief_30s -R-108/-103/35/40 -Gtut_relief.nc gmt grdgradient tut_relief.nc -Ne0.8 -A100 -fg -Gus_i.nc diff --git a/doc/scripts/GMT_tut_2.ps b/doc/scripts/GMT_tut_2.ps index 30d662c43ce..d34d424241d 100644 Binary files a/doc/scripts/GMT_tut_2.ps and b/doc/scripts/GMT_tut_2.ps differ diff --git a/doc/scripts/GMT_tut_2.sh b/doc/scripts/GMT_tut_2.sh index acafdea58fa..f4494c5cbfb 100755 --- a/doc/scripts/GMT_tut_2.sh +++ b/doc/scripts/GMT_tut_2.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_2 + gmt set GMT_THEME cookbook gmt basemap -R1/10000/1e20/1e25 -JX9il/6il -Bxa2+l"Wavelength (m)" -Bya1pf3+l"Power (W)" -BWS gmt end show diff --git a/doc/scripts/GMT_tut_3.ps b/doc/scripts/GMT_tut_3.ps index bba1510f2eb..2efc8dca22f 100644 Binary files a/doc/scripts/GMT_tut_3.ps and b/doc/scripts/GMT_tut_3.ps differ diff --git a/doc/scripts/GMT_tut_3.sh b/doc/scripts/GMT_tut_3.sh index 8cbb07d705a..d0bde0e2661 100755 --- a/doc/scripts/GMT_tut_3.sh +++ b/doc/scripts/GMT_tut_3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_3 + gmt set GMT_THEME cookbook gmt coast -R-90/-70/0/20 -JM6i -B -Gchocolate gmt end show diff --git a/doc/scripts/GMT_tut_4.ps b/doc/scripts/GMT_tut_4.ps index f47d4e1a3b7..85e8ece273d 100644 Binary files a/doc/scripts/GMT_tut_4.ps and b/doc/scripts/GMT_tut_4.ps differ diff --git a/doc/scripts/GMT_tut_4.sh b/doc/scripts/GMT_tut_4.sh index 532ccafaa68..d79d1b3066f 100755 --- a/doc/scripts/GMT_tut_4.sh +++ b/doc/scripts/GMT_tut_4.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_4 - gmt coast -R-130/-70/24/52 -JB-100/35/33/45/6i -B -B+t"Conic Projection" -N1/thickest -N2/thinnest -A500 -Ggray -Wthinnest + gmt set GMT_THEME cookbook + gmt coast -R-130/-70/24/52 -JB-100/35/33/45/6i -B -B+t"Conic Projection" -N1/thicker -N2/thinnest -A500 -Ggray -Wthinnest gmt end show diff --git a/doc/scripts/GMT_tut_5.ps b/doc/scripts/GMT_tut_5.ps index e3dbbdfc321..d42978e0d13 100644 Binary files a/doc/scripts/GMT_tut_5.ps and b/doc/scripts/GMT_tut_5.ps differ diff --git a/doc/scripts/GMT_tut_5.sh b/doc/scripts/GMT_tut_5.sh index 12f812eac0e..c5a7cda0246 100755 --- a/doc/scripts/GMT_tut_5.sh +++ b/doc/scripts/GMT_tut_5.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_5 + gmt set GMT_THEME cookbook gmt coast -Rg -JG280/30/6i -Bag -Dc -A5000 -Gwhite -SDarkTurquoise gmt end show diff --git a/doc/scripts/GMT_tut_6.ps b/doc/scripts/GMT_tut_6.ps index 3174d8f4995..554f6a670f7 100644 Binary files a/doc/scripts/GMT_tut_6.ps and b/doc/scripts/GMT_tut_6.ps differ diff --git a/doc/scripts/GMT_tut_6.sh b/doc/scripts/GMT_tut_6.sh index 55b146e630f..41d3819892f 100755 --- a/doc/scripts/GMT_tut_6.sh +++ b/doc/scripts/GMT_tut_6.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_6 + gmt set GMT_THEME cookbook gmt coast -Rg -JKs180/9i -Bag -Dc -A5000 -Gchocolate -SDarkTurquoise -Wthinnest gmt end show diff --git a/doc/scripts/GMT_tut_7.ps b/doc/scripts/GMT_tut_7.ps index c72b37cad91..23b9a4650dd 100644 Binary files a/doc/scripts/GMT_tut_7.ps and b/doc/scripts/GMT_tut_7.ps differ diff --git a/doc/scripts/GMT_tut_7.sh b/doc/scripts/GMT_tut_7.sh index cb6126df3d8..bde5e6416cb 100755 --- a/doc/scripts/GMT_tut_7.sh +++ b/doc/scripts/GMT_tut_7.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash gmt begin GMT_tut_7 + gmt set GMT_THEME cookbook gmt plot @tut_data.txt -R0/6/0/6 -Jx1i -B -Wthinner gmt end show diff --git a/doc/scripts/GMT_tut_8.ps b/doc/scripts/GMT_tut_8.ps index 76fcef51930..f77fdce9aab 100644 Binary files a/doc/scripts/GMT_tut_8.ps and b/doc/scripts/GMT_tut_8.ps differ diff --git a/doc/scripts/GMT_tut_8.sh b/doc/scripts/GMT_tut_8.sh index 6165dfcdd81..701e854b573 100755 --- a/doc/scripts/GMT_tut_8.sh +++ b/doc/scripts/GMT_tut_8.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_8 + gmt set GMT_THEME cookbook gmt plot @tut_data.txt -R0/6/0/6 -Jx1i -B -Wthinner gmt plot tut_data.txt -W -Si0.2i gmt end show diff --git a/doc/scripts/GMT_tut_9.ps b/doc/scripts/GMT_tut_9.ps index 561e831828f..48e85f0e6bb 100644 Binary files a/doc/scripts/GMT_tut_9.ps and b/doc/scripts/GMT_tut_9.ps differ diff --git a/doc/scripts/GMT_tut_9.sh b/doc/scripts/GMT_tut_9.sh index 0e3008827d7..aa168288c2d 100755 --- a/doc/scripts/GMT_tut_9.sh +++ b/doc/scripts/GMT_tut_9.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_tut_9 + gmt set GMT_THEME cookbook gmt makecpt -Cred,green,blue -T0,100,300,10000 gmt coast -R130/150/35/50 -JM6i -B -Ggray gmt plot @tut_quakes.ngdc -Wfaint -i4,3,5,6+s0.1 -h3 -Scc -C diff --git a/doc/scripts/GMT_utm_zones.ps b/doc/scripts/GMT_utm_zones.ps index 2b1fd122bf7..0bf81bd389a 100644 Binary files a/doc/scripts/GMT_utm_zones.ps and b/doc/scripts/GMT_utm_zones.ps differ diff --git a/doc/scripts/GMT_utm_zones.sh b/doc/scripts/GMT_utm_zones.sh index 16c15d26041..6b90b471489 100755 --- a/doc/scripts/GMT_utm_zones.sh +++ b/doc/scripts/GMT_utm_zones.sh @@ -3,9 +3,8 @@ # Makes a plot of the global UTM zone grid including the exceptions near Norway/Spitsbergen # gmt begin GMT_utm_zones -gmt set MAP_FRAME_TYPE plain FORMAT_GEO_MAP dddF MAP_TITLE_OFFSET 0.25i MAP_ANNOT_OFFSET_PRIMARY 0.15i FONT_TITLE 24p FONT_ANNOT_PRIMARY 10p PS_MEDIA 11ix8.5i - -gmt coast -Rd -JQ9i -Groyalblue -Sazure -Dl -A2000 -Bx60f6 -By0 -BwsNe +gmt set GMT_THEME cookbook +gmt coast -Rd -JQ9i -Groyalblue -Sazure -Dl -A2000 -Bx60f6 -By0 -BwsNe --MAP_ANNOT_OFFSET_PRIMARY=0.15i cat << EOF > tt.z.d > Do S pole zone -180 -80 diff --git a/doc/scripts/GMT_vector.ps b/doc/scripts/GMT_vector.ps index 6653a34322c..7f4c67cfec2 100644 Binary files a/doc/scripts/GMT_vector.ps and b/doc/scripts/GMT_vector.ps differ diff --git a/doc/scripts/GMT_vector.sh b/doc/scripts/GMT_vector.sh index bc93bfe9b4d..a5907fec6af 100755 --- a/doc/scripts/GMT_vector.sh +++ b/doc/scripts/GMT_vector.sh @@ -2,6 +2,7 @@ # # Demonstrate vector details gmt begin GMT_vector ps +gmt set GMT_THEME cookbook # Cartesian straight arrows gmt plot -R0/5/0/5 -JX6i -Sv1i+s+e+a50+p0.25p,dashed -W5p <<- EOF 0.5 0.5 4.5 1.5 diff --git a/doc/scripts/GMT_vector4.sh b/doc/scripts/GMT_vector4.sh index 9a85e723f5b..1e1d4262ec1 100755 --- a/doc/scripts/GMT_vector4.sh +++ b/doc/scripts/GMT_vector4.sh @@ -2,6 +2,7 @@ # # Demonstrate deprecated GMT4 vector gmt begin GMT_vector4 ps +gmt set GMT_THEME cookbook # Cartesian straight arrows a=$(gmt math -Q 1 4 DIV ATAN R2D =) L=$(gmt math -Q 1 4 HYPOT =) diff --git a/doc/scripts/GMT_vertscale.ps b/doc/scripts/GMT_vertscale.ps index 540a7d192b2..cd5fad4e699 100644 Binary files a/doc/scripts/GMT_vertscale.ps and b/doc/scripts/GMT_vertscale.ps differ diff --git a/doc/scripts/GMT_vertscale.sh b/doc/scripts/GMT_vertscale.sh index c7cfda89290..e4c9c3dc884 100755 --- a/doc/scripts/GMT_vertscale.sh +++ b/doc/scripts/GMT_vertscale.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_vertscale + gmt set GMT_THEME cookbook gmt math -T-8/6/0.01 -N3/0 -C2 T 3 DIV 2 POW NEG EXP T PI 2 MUL MUL COS MUL 50 MUL = t.txt gmt wiggle -R-10/10/-3/3 -JM6i -B -Z100i -DjRM+w100+lnT t.txt -Tfaint -W1p -BWSne --MAP_FRAME_TYPE=plain gmt end show diff --git a/doc/scripts/GMT_volcano.ps b/doc/scripts/GMT_volcano.ps index 957f5fe29f7..b5bfd7a51e1 100644 Binary files a/doc/scripts/GMT_volcano.ps and b/doc/scripts/GMT_volcano.ps differ diff --git a/doc/scripts/GMT_volcano.sh b/doc/scripts/GMT_volcano.sh index 1c787f5e07c..7467965546b 100755 --- a/doc/scripts/GMT_volcano.sh +++ b/doc/scripts/GMT_volcano.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash gmt begin GMT_volcano +gmt set GMT_THEME cookbook echo "0 0" | gmt plot -R-0.5/0.5/-0.5/0.5 -JX2i -Ba0.25g0.05 -BWSne -Wthick -Skvolcano/2i cat < bullseye.def 0 -0.7 M -W0.5p,red diff --git a/doc/scripts/GMT_winkel.sh b/doc/scripts/GMT_winkel.sh index 6c283ca0359..6f6f1dbdbf5 100755 --- a/doc/scripts/GMT_winkel.sh +++ b/doc/scripts/GMT_winkel.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -gmt coast -Rd -JR12c -Bg -Dc -A10000 -Gburlywood4 -Swheat1 -ps GMT_winkel +gmt coast -Rd -JR12c -Bg -Dc -A10000 -Gburlywood4 -Swheat1 --GMT_THEME=cookbook -ps GMT_winkel diff --git a/doc/scripts/grdflexure_approx.ps b/doc/scripts/grdflexure_approx.ps index 3ec9b88d681..d41b4b56b2d 100644 Binary files a/doc/scripts/grdflexure_approx.ps and b/doc/scripts/grdflexure_approx.ps differ diff --git a/doc/scripts/grdflexure_approx.sh b/doc/scripts/grdflexure_approx.sh index e01f1dcc88c..965d5c8c2bb 100755 --- a/doc/scripts/grdflexure_approx.sh +++ b/doc/scripts/grdflexure_approx.sh @@ -5,6 +5,7 @@ # col 0 = x, col 1 = exact with shol != rhoi, 2 = exact solution (rhol), 3 = exact solution (rhoi), 4 approximate solution # Modified from Wessel [2016, GJI]. gmt begin grdflexure_approx + gmt set GMT_THEME cookbook gmt set FONT_ANNOT_PRIMARY 9p,Helvetica,black FONT_LABEL 12p,Helvetica,black PS_MEDIA letter MAP_VECTOR_SHAPE 0.5 # Normal cat <<- EOF > line.txt diff --git a/doc/scripts/psevents_intensity.ps b/doc/scripts/psevents_intensity.ps index 08194e6d4ee..cba93d44953 100644 Binary files a/doc/scripts/psevents_intensity.ps and b/doc/scripts/psevents_intensity.ps differ diff --git a/doc/scripts/psevents_intensity.sh b/doc/scripts/psevents_intensity.sh index 33ff2fca6ab..4c9d94db9e4 100755 --- a/doc/scripts/psevents_intensity.sh +++ b/doc/scripts/psevents_intensity.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Make a figure illustration intensity curve for an event across time in psevents gmt begin psevents_intensity + gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- diff --git a/doc/scripts/psevents_labels.ps b/doc/scripts/psevents_labels.ps index 005ed2faab4..d9e0473611d 100644 Binary files a/doc/scripts/psevents_labels.ps and b/doc/scripts/psevents_labels.ps differ diff --git a/doc/scripts/psevents_labels.sh b/doc/scripts/psevents_labels.sh index 6ea74b8ea99..87ae0689bd5 100755 --- a/doc/scripts/psevents_labels.sh +++ b/doc/scripts/psevents_labels.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Make a figure illustrating transparency curve for an event label across time in psevents gmt begin psevents_labels + gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- diff --git a/doc/scripts/psevents_size.ps b/doc/scripts/psevents_size.ps index 6dfc8b7c02b..b861280841f 100644 Binary files a/doc/scripts/psevents_size.ps and b/doc/scripts/psevents_size.ps differ diff --git a/doc/scripts/psevents_size.sh b/doc/scripts/psevents_size.sh index db0c4809b3b..7ea0e6b93cd 100755 --- a/doc/scripts/psevents_size.sh +++ b/doc/scripts/psevents_size.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Make a figure illustration size curve for an event across time in psevents gmt begin psevents_size + gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- diff --git a/doc/scripts/psevents_transparency.ps b/doc/scripts/psevents_transparency.ps index 3e15ade77de..61723aee02b 100644 Binary files a/doc/scripts/psevents_transparency.ps and b/doc/scripts/psevents_transparency.ps differ diff --git a/doc/scripts/psevents_transparency.sh b/doc/scripts/psevents_transparency.sh index 9b648aef75c..132c96d02f9 100755 --- a/doc/scripts/psevents_transparency.sh +++ b/doc/scripts/psevents_transparency.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Make a figure illustrating transparency curve for an event across time in psevents gmt begin psevents_transparency + gmt set GMT_THEME cookbook cat <<- EOF > B.txt -0.5 afg t@-r@- 0 afg t@-b@- diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index 12b664f596c..6937eebda1d 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -18,7 +18,7 @@ # share/CMakeLists.txt # -set (_gmt_share_dirs cpt custom localization mgd77 mgg spotter x2sys) +set (_gmt_share_dirs cpt custom localization mgd77 mgg spotter themes x2sys) # install target for data install (DIRECTORY ${_gmt_share_dirs} diff --git a/share/themes/cookbook.conf b/share/themes/cookbook.conf new file mode 100644 index 00000000000..008ae5c5963 --- /dev/null +++ b/share/themes/cookbook.conf @@ -0,0 +1,38 @@ +# +# Defaults file for modern theme (under classic) +# +# FONT Parameters +# +FONT_ANNOT_PRIMARY = 12p,Helvetica,black +FONT_ANNOT_SECONDARY = 14p,Helvetica,black +FONT_HEADING = 32p,Helvetica-Bold,black +FONT_LABEL = 16p,Helvetica,black +FONT_LOGO = 8p,Helvetica,black +FONT_SUBTITLE = 18p,Helvetica-Bold,black +FONT_TAG = 20p,Helvetica,black +FONT_TITLE = 24p,Helvetica-Bold,black +# +# FORMAT Parameters +# +FORMAT_GEO_MAP = ddd:mm:ssF +# +# MAP Parameters +# +MAP_ANNOT_MIN_SPACING = auto +MAP_ANNOT_OFFSET_PRIMARY = auto +MAP_ANNOT_OFFSET_SECONDARY = auto +MAP_FRAME_AXES = auto +MAP_FRAME_PEN = auto +MAP_FRAME_TYPE = fancy +MAP_FRAME_WIDTH = auto +MAP_GRID_PEN_PRIMARY = auto +MAP_GRID_PEN_SECONDARY = auto +MAP_HEADING_OFFSET = auto +MAP_LABEL_OFFSET = auto +MAP_POLAR_CAP = auto +MAP_TICK_LENGTH_PRIMARY = auto +MAP_TICK_LENGTH_SECONDARY = auto +MAP_TICK_PEN_PRIMARY = auto +MAP_TICK_PEN_SECONDARY = auto +MAP_TITLE_OFFSET = auto +MAP_VECTOR_SHAPE = 0.5 diff --git a/share/themes/minimal.conf b/share/themes/minimal.conf new file mode 100644 index 00000000000..fa888cf3c75 --- /dev/null +++ b/share/themes/minimal.conf @@ -0,0 +1,37 @@ +# +# Defaults file for minimal theme +# +# FONT Parameters +# +FONT_ANNOT_PRIMARY = auto,AvantGarde-Book,black +FONT_ANNOT_SECONDARY = auto,AvantGarde-Book,black +FONT_HEADING = auto,AvantGarde-Book,black +FONT_LABEL = auto,AvantGarde-Book,black +FONT_LOGO = auto,Helvetica,black +FONT_SUBTITLE = auto,AvantGarde-Book,black +FONT_TAG = auto,AvantGarde-Book,black +FONT_TITLE = auto,AvantGarde-Book,black +# +# FORMAT Parameters +# +FORMAT_GEO_MAP = ddd:mm:ss +# +# MAP Parameters +# +MAP_ANNOT_MIN_SPACING = auto +MAP_ANNOT_OFFSET_PRIMARY = auto +MAP_ANNOT_OFFSET_SECONDARY = auto +MAP_FRAME_AXES = auto +MAP_FRAME_PEN = auto +MAP_FRAME_TYPE = plain +MAP_GRID_PEN_PRIMARY = thinner,lightgrey +MAP_GRID_PEN_SECONDARY = thinnest,lightgrey +MAP_HEADING_OFFSET = auto +MAP_LABEL_OFFSET = auto +MAP_POLAR_CAP = auto +MAP_TICK_LENGTH_PRIMARY = auto +MAP_TICK_LENGTH_SECONDARY = auto +MAP_TICK_PEN_PRIMARY = auto +MAP_TICK_PEN_SECONDARY = auto +MAP_TITLE_OFFSET = auto +MAP_VECTOR_SHAPE = 0.5 diff --git a/share/themes/modern.conf b/share/themes/modern.conf new file mode 100644 index 00000000000..ebc81629427 --- /dev/null +++ b/share/themes/modern.conf @@ -0,0 +1,38 @@ +# +# Defaults file for modern theme (under classic) +# +# FONT Parameters +# +FONT_ANNOT_PRIMARY = auto,Helvetica,black +FONT_ANNOT_SECONDARY = auto,Helvetica,black +FONT_HEADING = auto,Helvetica-Bold,black +FONT_LABEL = auto,Helvetica,black +FONT_LOGO = auto,Helvetica,black +FONT_SUBTITLE = auto,Helvetica-Bold,black +FONT_TAG = auto,Helvetica,black +FONT_TITLE = auto,Helvetica-Bold,black +# +# FORMAT Parameters +# +FORMAT_GEO_MAP = ddd:mm:ssF +# +# MAP Parameters +# +MAP_ANNOT_MIN_SPACING = auto +MAP_ANNOT_OFFSET_PRIMARY = auto +MAP_ANNOT_OFFSET_SECONDARY = auto +MAP_FRAME_AXES = auto +MAP_FRAME_PEN = auto +MAP_FRAME_TYPE = fancy +MAP_FRAME_WIDTH = auto +MAP_GRID_PEN_PRIMARY = auto +MAP_GRID_PEN_SECONDARY = auto +MAP_HEADING_OFFSET = auto +MAP_LABEL_OFFSET = auto +MAP_POLAR_CAP = auto +MAP_TICK_LENGTH_PRIMARY = auto +MAP_TICK_LENGTH_SECONDARY = auto +MAP_TICK_PEN_PRIMARY = auto +MAP_TICK_PEN_SECONDARY = auto +MAP_TITLE_OFFSET = auto +MAP_VECTOR_SHAPE = 0.5 diff --git a/share/tools/gmt_uninstall.sh b/share/tools/gmt_uninstall.sh index a84319a28bb..f80a3b617fd 100755 --- a/share/tools/gmt_uninstall.sh +++ b/share/tools/gmt_uninstall.sh @@ -46,7 +46,7 @@ else fi # 3. Remove share directory -for dir in cpt custom doc localization man mgd77 mgg spotter tools x2sys; do +for dir in cpt custom doc localization man mgd77 mgg spotter tools themes x2sys; do printf "Remove: %s/%s\n" $share $dir rm -rf $share/$dir done diff --git a/src/gmt_api.c b/src/gmt_api.c index e69c7bfcc08..18183cf7f58 100644 --- a/src/gmt_api.c +++ b/src/gmt_api.c @@ -13050,7 +13050,7 @@ int GMT_Get_Default (void *V_API, const char *keyword, char *value) { strcpy (value, "rows"); } else { /* Must process as a GMT setting */ - strcpy (value, gmtlib_putparameter (API->GMT, keyword)); + strcpy (value, gmtlib_getparameter (API->GMT, keyword)); error = (value[0] == '\0') ? GMT_OPTION_NOT_FOUND : GMT_NOERROR; } return_error (V_API, error); diff --git a/src/gmt_defaults.h b/src/gmt_defaults.h index 815d07856c0..4c60dd5032e 100644 --- a/src/gmt_defaults.h +++ b/src/gmt_defaults.h @@ -102,6 +102,7 @@ struct GMT_DEFAULTS { unsigned int fft; /* Any of FFT_implementations: k_fft_auto, k_fft_accelerate, k_fft_fftw3, k_fft_kiss, k_fft_brenner */ unsigned int fftw_plan; /* Only accessed if HAVE_FFTW3F is defined: Any of FFTW_planner_flags: FFTW_ESTIMATE, FFTW_MEASURE, FFTW_PATIENT, FFTW_EXHAUSTIVE */ unsigned int run_mode; /* Either classic [0] or modern [1] */ + bool update_theme; /* Refresh defaults with contents of selected theme */ bool use_modern_name; /* true if we should use the modern name in usage message */ double extrapolate_val[2];/* Choose between [0] = 0, 1D extrapolated vals are NaN, = 1 -> extrapolate, = 2 -> set to const stored in [1] */ bool fftwf_threads; /* Only accessed if HAVE_FFTW3F_THREADS is defined: Any of FFTW_planner_flags: FFTW_ESTIMATE, FFTW_MEASURE, FFTW_PATIENT, FFTW_EXHAUSTIVE */ @@ -110,6 +111,7 @@ struct GMT_DEFAULTS { unsigned int export_type; /* What data type to export to external APIs [GMT_DOUBLE] */ unsigned graphics_format; /* The default graphics format in modern mode [GMT_SESSION_FORMAT] */ int max_cores; /* The maximum number of cores for a multi-threaded module [GMT_MAX_CORES] */ + char theme[GMT_LEN64]; /* User-selected defaults theme */ /* IO group */ uint64_t n_bin_header_cols; /* Minimum number of columns in a binary file for which the all cols == NaN means segment header [2] */ unsigned int io_n_header_items; /* Number of header records expected when -h is used [1]; else 0 */ @@ -153,6 +155,7 @@ struct GMT_DEFAULTS { unsigned int map_logo_justify; /* Justification of the GMT timestamp box [1 (BL)] */ unsigned int map_frame_type; /* Fancy (0), plain (1), or graph (2) [0] */ unsigned int map_graph_extension_unit; /* If mapframetype is graph, the unit is GMT_CM, GMT_INCH, GMT_PT [%] */ + bool map_annot_oblique_set; /* true if user changed map_annot_oblique via a gmt.conf or --par=val */ bool map_logo; /* Plot time and map projection on map [false] */ struct GMT_PEN map_default_pen; /* Default pen for most pens [0.25p] */ struct GMT_PEN map_frame_pen; /* Pen attributes for map boundary [1.25p] */ diff --git a/src/gmt_init.c b/src/gmt_init.c index 45ebe708c34..3fad68cb5b6 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -42,7 +42,7 @@ * gmtlib_putcmyk Encode color argument into c/m/y/k textstring * gmtlib_putfill * gmtlib_setparameter Sets a default value given keyword,value-pair\n - * gmtlib_putparameter + * gmtlib_getparameter * gmt_GSHHG_syntax * gmt_label_syntax * gmt_cont_syntax @@ -119,7 +119,6 @@ So far, only gmtset calls this function with core = true, but this is a too fragile solution */ #define GMT_KEYWORD_UPDATE(val) if (core) GMT_keyword_updated[val] = true - /*--------------------------------------------------------------------*/ /* Load private fixed array parameters from include files */ /*--------------------------------------------------------------------*/ @@ -132,7 +131,7 @@ struct GMT_parameter { /* These are the active GMT5+ keywords, containing no backwards-compatible variants. * Also, some grouped keywords such as FONT and FONT_ANNOT are also not listed since they are not in gmt.conf. * If new keywords are added they need to be added here as well as to gmt_keywords.txt, plus - * specific entries in both gmtlib_setparameter and gmtlib_putparameter, and gmt.conf.rst */ + * specific entries in both gmtlib_setparameter and gmtlib_getparameter, and gmt.conf.rst */ static struct GMT_parameter GMT_keyword_active[]= { { 1, "COLOR Parameters"}, @@ -188,6 +187,7 @@ static struct GMT_parameter GMT_keyword_active[]= { { 0, "GMT_INTERPOLANT"}, { 0, "GMT_LANGUAGE"}, { 0, "GMT_MAX_CORES"}, + { 0, "GMT_THEME"}, { 0, "GMT_TRIANGULATE"}, { 0, "GMT_VERBOSE"}, { 1, "I/O Parameters"}, @@ -2739,7 +2739,7 @@ GMT_LOCAL int gmtinit_savedefaults (struct GMT_CTRL *GMT, char *file) { fprintf (fpo, "#\n# %s\n#\n", GMT_keyword_active[current_group].name); header = true; } - fprintf (fpo, "%-30s = %s\n", GMT_keyword_active[k].name, gmtlib_putparameter (GMT, GMT_keyword_active[k].name)); + fprintf (fpo, "%-30s = %s\n", GMT_keyword_active[k].name, gmtlib_getparameter (GMT, GMT_keyword_active[k].name)); k++; } @@ -3167,8 +3167,8 @@ void gmt_reload_history (struct GMT_CTRL *GMT) { } void gmt_reload_settings (struct GMT_CTRL *GMT) { - gmt_conf (GMT); /* Get the original system defaults */ - (void)gmt_getdefaults (GMT, NULL); /* Overload user defaults */ + gmt_conf_SI(GMT); /* Get the original system defaults for SI */ + (void)gmt_getdefaults (GMT, NULL); /* Overload with any user defaults from initial gmt.conf */ } /*! . */ @@ -4053,6 +4053,21 @@ void gmt_handle5_plussign (struct GMT_CTRL *GMT, char *in, char *mods, unsigned gmt_strrepc (in, 1, '+'); } +GMT_LOCAL void gmtinit_sides2axes (struct GMT_CTRL *GMT) { + /* Convert GMT->current.map.frame.side to corresponding MAP_FRAME_AXES string */ + unsigned int k, i = 0; + char *all = {"WESNZ"}, *tick = {"wesnz"}, *draw = {"lrbtu"}; + for (k = 0; k <= Z_SIDE; k++) { + if (GMT->current.map.frame.side[k] & GMT_AXIS_ALL) + GMT->current.setting.map_frame_axes[i++] = all[k]; + else if (GMT->current.map.frame.side[k] & GMT_AXIS_BARB) + GMT->current.setting.map_frame_axes[i++] = tick[k]; + else if (GMT->current.map.frame.side[k] & GMT_AXIS_DRAW) + GMT->current.setting.map_frame_axes[i++] = draw[k]; + } + GMT->current.setting.map_frame_axes[i] = '\0'; +} + /*! Scans the WESNZ[1234]wesnz[1234]lrbtu flags and sets the side/drawbox parameters * and returns the length of the remaining string. */ @@ -4060,6 +4075,7 @@ GMT_LOCAL int gmtinit_decode5_wesnz (struct GMT_CTRL *GMT, const char *in, bool unsigned int k, error = 0, f_side[5] = {0, 0, 0, 0, 0}, z_axis[4] = {0, 0, 0, 0}; bool s_given = false; + if (check) { /* true if coming via -B, false if parsing gmt.conf */ GMT->current.map.frame.set_frame[GMT_PRIMARY]++, GMT->current.map.frame.set_frame[GMT_SECONDARY]++; if (GMT->current.map.frame.set_frame[GMT_PRIMARY] > 1 || GMT->current.map.frame.set_frame[GMT_SECONDARY] > 1) { @@ -4067,8 +4083,10 @@ GMT_LOCAL int gmtinit_decode5_wesnz (struct GMT_CTRL *GMT, const char *in, bool return (1); } } - else + else { GMT->current.map.frame.draw_box = GMT_3D_NONE; + if (!strcmp (GMT->current.setting.map_frame_axes, "auto")) return GMT_NOERROR; /* Not ready to parse yet */ + } for (k = 0; in[k]; k++) { switch (in[k]) { /* Draw, Annotate, and Tick */ @@ -4119,6 +4137,8 @@ GMT_LOCAL int gmtinit_decode5_wesnz (struct GMT_CTRL *GMT, const char *in, bool GMT->current.map.frame.no_frame = false; GMT->current.map.frame.draw = true; if (check && f_side[Z_SIDE]) GMT->current.map.frame.drawz = true; + if (check) /* Update MAP_FRAME_AXES from sides */ + gmtinit_sides2axes (GMT); } if (GMT->current.map.frame.no_frame) gmt_M_memset (GMT->current.map.frame.side, 5, unsigned int); /* Set all to nothing */ if (z_axis[0] || z_axis[1] || z_axis[2] || z_axis[3]) gmt_M_memcpy (GMT->current.map.frame.z_axis, z_axis, 4, unsigned int); /* Overwrite the GMT defaults */ @@ -5968,7 +5988,48 @@ GMT_LOCAL int gmtinit_get_language (struct GMT_CTRL *GMT) { } /*! . */ -void gmt_conf (struct GMT_CTRL *GMT) { +GMT_LOCAL void gmtinit_conf_classic_US (struct GMT_CTRL *GMT) { + int i, case_val; + /* Update the settings to US where they differ from standard SI settings: + * Setting SI US + * -------------------------------------------- + * PROJ_LENGTH_UNIT cm inch + * PS_CHAR_ENCODING ISOLatin1+ Standard+ + * PS_MEDIA a4 letter + * TIME_WEEK_START Monday Sunday + */ + + /* PROJ_LENGTH_UNIT */ + case_val = gmt_hash_lookup (GMT, "PROJ_LENGTH_UNIT", keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); + if (case_val >= 0) GMT_keyword_updated[case_val] = true; + GMT->current.setting.proj_length_unit = GMT_INCH; + /* PS_CHAR_ENCODING */ + case_val = gmt_hash_lookup (GMT, "PS_CHAR_ENCODING", keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); + if (case_val >= 0) GMT_keyword_updated[case_val] = true; + strcpy (GMT->current.setting.ps_encoding.name, "Standard+"); + gmtinit_load_encoding (GMT); + /* PS_MEDIA */ + i = gmtinit_key_lookup ("letter", GMT_media_name, GMT_N_MEDIA); + GMT->current.setting.ps_def_page_size[0] = GMT_media[i].width; + GMT->current.setting.ps_def_page_size[1] = GMT_media[i].height; + if (GMT->current.setting.run_mode == GMT_MODERN) + gmtinit_setautopagesize (GMT); + else { + case_val = gmt_hash_lookup (GMT, "PS_MEDIA", keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); + if (case_val >= 0) GMT_keyword_updated[case_val] = true; + /* Use the specified standard format */ + GMT->current.setting.ps_media = i; + GMT->current.setting.ps_page_size[0] = GMT_media[i].width; + GMT->current.setting.ps_page_size[1] = GMT_media[i].height; + } + /* TIME_WEEK_START */ + case_val = gmt_hash_lookup (GMT, "TIME_WEEK_START", keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); + if (case_val >= 0) GMT_keyword_updated[case_val] = true; + GMT->current.setting.time_week_start = gmtinit_key_lookup ("Sunday", GMT_weekdays, 7); +} + +/*! . */ +GMT_LOCAL void gmtinit_conf_classic (struct GMT_CTRL *GMT) { int i, error = 0; char path[PATH_MAX] = {""}; double const pt = 1.0/72.0; /* points to inch */ @@ -6046,11 +6107,11 @@ void gmt_conf (struct GMT_CTRL *GMT) { GMT->current.setting.given_unit[GMTCASE_MAP_ANNOT_OFFSET_PRIMARY] = 'p'; GMT->current.setting.given_unit[GMTCASE_MAP_ANNOT_OFFSET_SECONDARY] = 'p'; /* MAP_ANNOT_OBLIQUE */ - GMT->current.setting.map_annot_oblique = GMT_OBL_ANNOT_ANYWHERE; + GMT->current.setting.map_annot_oblique = GMT_OBL_ANNOT_LON_HORIZONTAL | GMT_OBL_ANNOT_LAT_HORIZONTAL | GMT_OBL_ANNOT_EXTEND_TICKS; /* MAP_ANNOT_MIN_ANGLE */ GMT->current.setting.map_annot_min_angle = 20; /* MAP_ANNOT_MIN_SPACING */ - GMT->current.setting.map_annot_min_spacing = 0; /* 0p */ + GMT->current.setting.map_annot_min_spacing = 0; /* p */ GMT->current.setting.given_unit[GMTCASE_MAP_ANNOT_MIN_SPACING] = 'p'; strncpy (GMT->current.setting.map_annot_min_spacing_txt, "0p", GMT_LEN16); /* MAP_ANNOT_ORTHO */ @@ -6279,6 +6340,8 @@ void gmt_conf (struct GMT_CTRL *GMT) { strcpy (GMT->current.setting.language, "us"); /* GMT_MAX_CORES */ GMT->current.setting.max_cores = 0; + /* GMT_THEME */ + strcpy (GMT->current.setting.theme, "classic"); /* GMT_TRIANGULATE */ #ifdef TRIANGLE_D GMT->current.setting.triangulate = GMT_TRIANGLE_SHEWCHUK; @@ -6339,48 +6402,165 @@ void gmt_conf (struct GMT_CTRL *GMT) { GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unrecognized value during gmtdefaults initialization.\n"); if (!strncmp (GMT_DEF_UNITS, "US", 2U)) - gmt_conf_US (GMT); /* Override with US settings */ + gmtinit_conf_classic_US (GMT); /* Override with US settings */ + + if (GMT->current.setting.run_mode == GMT_MODERN) { /* Means we switch to classic in a modern mode setssion */ + GMT_keyword_updated[GMTCASE_FONT_ANNOT_PRIMARY] = true; + GMT_keyword_updated[GMTCASE_FONT_ANNOT_SECONDARY] = true; + GMT_keyword_updated[GMTCASE_FONT_LABEL] = true; + GMT_keyword_updated[GMTCASE_FONT_HEADING] = true; + GMT_keyword_updated[GMTCASE_FONT_TAG] = true; + GMT_keyword_updated[GMTCASE_FONT_TITLE] = true; + GMT_keyword_updated[GMTCASE_FONT_SUBTITLE] = true; + GMT_keyword_updated[GMTCASE_FONT_LOGO] = true; + GMT_keyword_updated[GMTCASE_FORMAT_GEO_MAP] = true; + GMT_keyword_updated[GMTCASE_MAP_ANNOT_OFFSET_PRIMARY] = true; + GMT_keyword_updated[GMTCASE_MAP_ANNOT_OFFSET_SECONDARY] = true; + GMT_keyword_updated[GMTCASE_MAP_FRAME_AXES] = true; + GMT_keyword_updated[GMTCASE_MAP_LABEL_OFFSET] = true; + GMT_keyword_updated[GMTCASE_MAP_TITLE_OFFSET] = true; + GMT_keyword_updated[GMTCASE_MAP_HEADING_OFFSET] = true; + GMT_keyword_updated[GMTCASE_MAP_TICK_LENGTH_PRIMARY] = true; + GMT_keyword_updated[GMTCASE_MAP_TICK_LENGTH_SECONDARY] = true; + GMT_keyword_updated[GMTCASE_MAP_FRAME_WIDTH] = true; + GMT_keyword_updated[GMTCASE_MAP_FRAME_PEN] = true; + GMT_keyword_updated[GMTCASE_MAP_TICK_PEN_PRIMARY] = true; + GMT_keyword_updated[GMTCASE_MAP_TICK_PEN_SECONDARY] = true; + GMT_keyword_updated[GMTCASE_MAP_GRID_PEN_PRIMARY] = true; + GMT_keyword_updated[GMTCASE_MAP_GRID_PEN_SECONDARY] = true; + GMT_keyword_updated[GMTCASE_MAP_VECTOR_SHAPE] = true; + } +} + +/*! . */ +GMT_LOCAL void gmtinit_conf_modern_override (struct GMT_CTRL *GMT) { + int i, error = 0; +#if NO_THEMES + return; /* Ignore all the modern theme stuff */ +#endif + + /* These settings override the classic defaults settings and make the modern settings. + * In addition to some changes in font names, the key thing is lack of dimension as those + * will be set based on map size. The user can override any of those with a specific + * dimension (font size, length, etc.) with gmt set or --PAR=value. Below, all modern + * font sizes are set to auto [->NaN] and all dimensions are set to NaN. If these remain + * NaN after reading gmt.conf then they are auto-scaled in gmt_set_undefined_defaults. */ + + /* FONT group */ + + /* FONT_ANNOT_PRIMARY */ + error += gmt_getfont (GMT, "auto,Helvetica,black", &GMT->current.setting.font_annot[GMT_PRIMARY]); + GMT->current.setting.given_unit[GMTCASE_FONT_ANNOT_PRIMARY] = 'p'; + /* FONT_ANNOT_SECONDARY */ + error += gmt_getfont (GMT, "auto,Helvetica,black", &GMT->current.setting.font_annot[GMT_SECONDARY]); + GMT->current.setting.given_unit[GMTCASE_FONT_ANNOT_SECONDARY] = 'p'; + /* FONT_HEADING */ + error += gmt_getfont (GMT, "auto,Helvetica-Bold,black", &GMT->current.setting.font_heading); + GMT->current.setting.given_unit[GMTCASE_FONT_HEADING] = 'p'; + /* FONT_TITLE */ + error += gmt_getfont (GMT, "auto,Helvetica-Bold,black", &GMT->current.setting.font_title); + GMT->current.setting.given_unit[GMTCASE_FONT_TITLE] = 'p'; + /* FONT_SUBTITLE */ + error += gmt_getfont (GMT, "auto,Helvetica-Bold,black", &GMT->current.setting.font_subtitle); + GMT->current.setting.given_unit[GMTCASE_FONT_SUBTITLE] = 'p'; + /* FONT_LABEL */ + error += gmt_getfont (GMT, "auto,Helvetica,black", &GMT->current.setting.font_label); + GMT->current.setting.given_unit[GMTCASE_FONT_LABEL] = 'p'; + /* FONT_TAG */ + error += gmt_getfont (GMT, "auto,Helvetica,black", &GMT->current.setting.font_tag); + GMT->current.setting.given_unit[GMTCASE_FONT_TAG] = 'p'; + /* FONT_LOGO */ + error += gmt_getfont (GMT, "auto,Helvetica,black", &GMT->current.setting.font_logo); + GMT->current.setting.given_unit[GMTCASE_FONT_LOGO] = 'p'; + + /* FORMAT_GEO_MAP */ + strcpy (GMT->current.setting.format_geo_map, "ddd:mm:ssF"); + gmtlib_plot_C_format (GMT); /* Update format statements */ + + /* GMT_THEME */ + strcpy (GMT->current.setting.theme, "modern"); + + /* MAP group */ + + /* MAP_ANNOT_MIN_SPACING */ + GMT->current.setting.map_annot_min_spacing = GMT->session.d_NaN; /* 28p */ + GMT->current.setting.given_unit[GMTCASE_MAP_ANNOT_MIN_SPACING] = 'p'; + /* MAP_ANNOT_OFFSET_PRIMARY, MAP_ANNOT_OFFSET_SECONDARY */ + GMT->current.setting.map_annot_offset[GMT_PRIMARY] = GMT->current.setting.map_annot_offset[GMT_SECONDARY] = GMT->session.d_NaN; /* 3p */ + GMT->current.setting.given_unit[GMTCASE_MAP_ANNOT_OFFSET_PRIMARY] = 'p'; + GMT->current.setting.given_unit[GMTCASE_MAP_ANNOT_OFFSET_SECONDARY] = 'p'; + /* MAP_FRAME_AXES */ + strcpy (GMT->current.setting.map_frame_axes, "auto"); + /* MAP_FRAME_TYPE (plain) */ + GMT->current.setting.map_frame_type = GMT_IS_FANCY; + /* MAP_FRAME_WIDTH */ + GMT->current.setting.map_frame_width = GMT->session.d_NaN; /* 3p */ + GMT->current.setting.given_unit[GMTCASE_MAP_FRAME_WIDTH] = 'p'; + /* MAP_HEADING_OFFSET */ + GMT->current.setting.map_heading_offset = GMT->session.d_NaN; /* 16p */ + GMT->current.setting.given_unit[GMTCASE_MAP_HEADING_OFFSET] = 'p'; + /* MAP_LABEL_OFFSET */ + GMT->current.setting.map_label_offset = GMT->session.d_NaN; /* 6p */ + GMT->current.setting.given_unit[GMTCASE_MAP_LABEL_OFFSET] = 'p'; + /* MAP_POLAR_CAP */ + GMT->current.setting.map_polar_cap[0] = GMT->session.d_NaN; /* 85 */ + /* MAP_TICK_LENGTH_PRIMARY */ + GMT->current.setting.map_tick_length[GMT_ANNOT_UPPER] = GMT->session.d_NaN; /* 4p */ + GMT->current.setting.map_tick_length[GMT_TICK_UPPER] = GMT->session.d_NaN; /* 2p */ + GMT->current.setting.given_unit[GMTCASE_MAP_TICK_LENGTH_PRIMARY] = 'p'; + /* MAP_TICK_LENGTH_SECONDARY */ + GMT->current.setting.map_tick_length[GMT_ANNOT_LOWER] = GMT->session.d_NaN; /* 12p */ + GMT->current.setting.map_tick_length[GMT_TICK_LOWER] = GMT->session.d_NaN; /* 3p */ + GMT->current.setting.given_unit[GMTCASE_MAP_TICK_LENGTH_SECONDARY] = 'p'; + /* MAP_TITLE_OFFSET */ + GMT->current.setting.map_title_offset = GMT->session.d_NaN; /* 12p */ + GMT->current.setting.given_unit[GMTCASE_MAP_TITLE_OFFSET] = 'p'; + /* MAP_VECTOR_SHAPE */ + GMT->current.setting.map_vector_shape = GMT->session.d_NaN; /* 0.5 */ + + + /* MAP_FRAME_PEN */ + GMT->current.setting.map_frame_pen.width = GMT->session.d_NaN; /* 1.5p (thicker) */ + /* MAP_TICK_PEN_PRIMARY */ + GMT->current.setting.map_tick_pen[GMT_PRIMARY].width = GMT->session.d_NaN; /* 0.5p (thinner) */ + /* MAP_TICK_PEN_SECONDARY */ + GMT->current.setting.map_tick_pen[GMT_SECONDARY].width = GMT->session.d_NaN; /* 0.5p (thinner) */ + /* MAP_GRID_PEN_PRIMARY */ + GMT->current.setting.map_grid_pen[GMT_PRIMARY].width = GMT->session.d_NaN; /* 0.25p (default) */ + /* MAP_GRID_PEN_SECONDARY */ + GMT->current.setting.map_grid_pen[GMT_SECONDARY].width = GMT->session.d_NaN; /* 0.5p (thinner) */ + + if (error) + GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unrecognized value during gmtdefaults modern initialization.\n");} + +/*! . */ +GMT_LOCAL void gmtinit_conf_modern_US (struct GMT_CTRL *GMT) { + gmtinit_conf_classic_US (GMT); /* Override with US settings */ + gmtinit_conf_modern_override (GMT); +} + +/*! . */ +GMT_LOCAL void gmtinit_conf_modern (struct GMT_CTRL *GMT) { + /* REPLACE WITH gmtinit_conf_modern when ready */ + gmtinit_conf_classic (GMT); + gmtinit_conf_modern_override (GMT); } /*! . */ void gmt_conf_US (struct GMT_CTRL *GMT) { - int i, case_val; - /* Update the settings to US where they differ from standard SI settings: - * Setting SI US - * -------------------------------------------- - * PROJ_LENGTH_UNIT cm inch - * PS_CHAR_ENCODING ISOLatin1+ Standard+ - * PS_MEDIA a4 letter - * TIME_WEEK_START Monday Sunday - */ + if (GMT->current.setting.run_mode == GMT_MODERN) + gmtinit_conf_modern_US (GMT); + else + gmtinit_conf_classic_US (GMT); +} - /* PROJ_LENGTH_UNIT */ - case_val = gmt_hash_lookup (GMT, "PROJ_LENGTH_UNIT", keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); - if (case_val >= 0) GMT_keyword_updated[case_val] = true; - GMT->current.setting.proj_length_unit = GMT_INCH; - /* PS_CHAR_ENCODING */ - case_val = gmt_hash_lookup (GMT, "PS_CHAR_ENCODING", keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); - if (case_val >= 0) GMT_keyword_updated[case_val] = true; - strcpy (GMT->current.setting.ps_encoding.name, "Standard+"); - gmtinit_load_encoding (GMT); - /* PS_MEDIA */ - i = gmtinit_key_lookup ("letter", GMT_media_name, GMT_N_MEDIA); - GMT->current.setting.ps_def_page_size[0] = GMT_media[i].width; - GMT->current.setting.ps_def_page_size[1] = GMT_media[i].height; +/*! . */ +void gmt_conf_SI (struct GMT_CTRL *GMT) { if (GMT->current.setting.run_mode == GMT_MODERN) - gmtinit_setautopagesize (GMT); - else { - case_val = gmt_hash_lookup (GMT, "PS_MEDIA", keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); - if (case_val >= 0) GMT_keyword_updated[case_val] = true; - /* Use the specified standard format */ - GMT->current.setting.ps_media = i; - GMT->current.setting.ps_page_size[0] = GMT_media[i].width; - GMT->current.setting.ps_page_size[1] = GMT_media[i].height; - } - /* TIME_WEEK_START */ - case_val = gmt_hash_lookup (GMT, "TIME_WEEK_START", keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); - if (case_val >= 0) GMT_keyword_updated[case_val] = true; - GMT->current.setting.time_week_start = gmtinit_key_lookup ("Sunday", GMT_weekdays, 7); + gmtinit_conf_modern (GMT); + else + gmtinit_conf_classic (GMT); + GMT->current.setting.map_annot_oblique_set = false; } /*! . */ @@ -9580,10 +9760,7 @@ char gmt_set_V (int mode) { return val; } -EXTERN_MSC int GMT_get_V (char arg); /* For backward compatibility in MEX for 5.2 */ -int GMT_get_V (char arg) { - return gmt_get_V (arg); -} +GMT_LOCAL int gmtinit_update_theme (struct GMT_CTRL *GMT); /* Must set this here since the next two functions call each other */ /*! . */ GMT_LOCAL int gmtinit_loaddefaults (struct GMT_CTRL *GMT, char *file) { @@ -9613,15 +9790,17 @@ GMT_LOCAL int gmtinit_loaddefaults (struct GMT_CTRL *GMT, char *file) { keyword[0] = value[0] = '\0'; /* Initialize */ sscanf (line, "%s = %[^\n]", keyword, value); - if (gmtlib_setparameter (GMT, keyword, value, false)) + if (gmtlib_setparameter (GMT, keyword, value, true)) error++; else { int case_val = gmt_hash_lookup (GMT, keyword, keys_hashnode, GMT_N_KEYS, GMT_N_KEYS); if (case_val >= 0) GMT_keyword_updated[case_val] = true; /* Leave a record that this keyword is no longer a default one */ } } - fclose (fp); + + error += gmtinit_update_theme (GMT); /* If we got a GMT_THEME setting, take delayed action now */ + gmtinit_verify_encodings (GMT); if (error) gmt_message (GMT, "%d GMT Defaults conversion errors in file %s!\n", error, file); @@ -9629,6 +9808,27 @@ GMT_LOCAL int gmtinit_loaddefaults (struct GMT_CTRL *GMT, char *file) { return (GMT_NOERROR); } +GMT_LOCAL int gmtinit_update_theme (struct GMT_CTRL *GMT) { + int error = GMT_NOERROR; + char theme_file[PATH_MAX] = {""}; + + if (!GMT->current.setting.update_theme) return GMT_NOERROR; /* Nothing to do */ + if (!strcmp (GMT->current.setting.theme, "off")) return GMT_NOERROR; /* Nothing to do */ + + /* Got a GMT_THEME setting, take delayed action now */ + GMT->current.setting.update_theme = false; + if (!strcmp (GMT->current.setting.theme, "classic")) /* Just reload the classic defaults */ + gmtinit_conf_classic (GMT); + else if (!strcmp (GMT->current.setting.theme, "modern")) + gmtinit_conf_modern (GMT); + else if (gmt_getsharepath (GMT, "themes", GMT->current.setting.theme, ".conf", theme_file, R_OK)) { /* Load given theme */ + error = gmtinit_loaddefaults (GMT, theme_file); + } + else + gmt_message (GMT, "Theme %s file not found - ignored\n", GMT->current.setting.theme); + return (error); +} + void gmtinit_update_keys (struct GMT_CTRL *GMT, bool arg) { gmt_M_unused(GMT); if (arg == false) @@ -9663,6 +9863,8 @@ unsigned int gmt_setdefaults (struct GMT_CTRL *GMT, struct GMT_OPTION *options) } } + n_errors += gmtinit_update_theme (GMT); /* If we got a GMT_THEME setting, take delayed action now */ + if (param != NULL) /* param should be NULL unless no value were added */ GMT_Report (GMT->parent, GMT_MSG_WARNING, "Last GMT Defaults parameter from command options had no value\n"); @@ -9670,6 +9872,206 @@ unsigned int gmt_setdefaults (struct GMT_CTRL *GMT, struct GMT_OPTION *options) return (n_errors); } +void gmt_set_undefined_axes (struct GMT_CTRL *GMT, bool conf_update) { + char axes[GMT_LEN32] = {""}; + double az = (gmt_M_is_zero (GMT->common.p.z_rotation)) ? GMT->current.proj.z_project.view_azimuth : GMT->common.p.z_rotation; + if (strcmp (GMT->current.setting.map_frame_axes, "auto")) return; + + /* Determine suitable MAP_FRAME_AXES for plot */ + if (GMT->current.proj.projection == GMT_POLAR) { /* May need to switch what is south and north */ + strcpy (axes, GMT->current.proj.flip ? "WrStZ" : "WrbNZ"); + GMT_Report (GMT->parent, GMT_MSG_NOTICE, "Given polar projection flip = %d, set MAP_FRAME_AXES = %s\n", GMT->current.proj.flip, axes); + } + else if (!doubleAlmostEqual (az, 180.0)) { /* Rotated, so must adjust */ + unsigned int quadrant = urint (floor (az / 90.0)) + 1; + switch (quadrant) { + case 1: strcpy (axes, "lEbNZ"); break; + case 2: strcpy (axes, "lEStZ"); break; + case 3: strcpy (axes, "WrStZ"); break; + case 4: strcpy (axes, "WrbNZ"); break; + } + GMT_Report (GMT->parent, GMT_MSG_NOTICE, "Given view angle = %g, set MAP_FRAME_AXES = %s\n", az, axes); + } + else /* Default modern mode setting */ + strcpy (axes, "WrStZ"); + gmtlib_setparameter (GMT, "MAP_FRAME_AXES", axes, conf_update); + (void)gmtinit_decode5_wesnz (GMT, axes, false); +} + +void gmt_set_undefined_defaults (struct GMT_CTRL *GMT, double plot_dim, bool conf_update) { + /* We must adjust all frame items with unspecified size according to plot dimension */ + bool geo_frame = false; + double fontsize, scale; + double const pt = 1.0/72.0; /* points to inch */ + +#if NO_THEMES + return; /* Ignore all the modern theme stuff */ +#endif + + /* Refuse to do this in gmtset */ + if (!strcmp (GMT->init.module_name, "gmtset")) {fprintf (stderr, "Not doing it\n"); return; } + + gmt_set_undefined_axes (GMT, conf_update); /* Determine suitable MAP_FRAME_AXES for plot if still auto */ + + /* If a geographic map frame is fancy then we cannot have lrbt regardless of mode */ + + geo_frame = (gmt_M_is_geographic (GMT, GMT_IN) && (GMT->current.setting.map_frame_type == GMT_IS_FANCY || GMT->current.setting.map_frame_type == GMT_IS_ROUNDED)); + if (geo_frame) { /* Turn any l,r,b,t to w,e,s,n */ + for (unsigned int k = 0; k < 4; k++) + if (GMT->current.map.frame.side[k] & GMT_AXIS_DRAW) GMT->current.map.frame.side[k] |= GMT_AXIS_BARB; + } + + /* Use this equation for fontsize to compute the primary annotation font size given map max dimension */ + + if (gmt_M_is_zero (plot_dim)) { /* Get nominal reference values */ + fontsize = 10; + scale = 1.0; + } + else { /* Use map dimensions to get scale */ + double map_dim_cm = plot_dim * GMT->session.u2u[GMT_INCH][GMT_CM]; + fontsize = (2.0/15.0) * (map_dim_cm - 10.0) + 9; /* Gives result in points for plot dimension in cm */ + scale = fontsize / 10.0; /* scaling for offsets, pen widths and lengths normalized to the modern 10p size */ + } + + GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Computed primary annotation font size: %g p Dimension scaling: %g\n", fontsize, scale); + + /* Only apply the automatic scaling to items NOT specifically set via a --PAR=value option */ + + if (gmt_M_is_dnan (GMT->current.setting.font_annot[GMT_PRIMARY].size)) { + GMT->current.setting.font_annot[GMT_PRIMARY].size = fontsize; + if (conf_update) GMT_keyword_updated[GMTCASE_FONT_ANNOT_PRIMARY] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.font_annot[GMT_SECONDARY].size)) { + GMT->current.setting.font_annot[GMT_SECONDARY].size = scale * 12.0; /* Modern 12p vs 10p */ + if (conf_update) GMT_keyword_updated[GMTCASE_FONT_ANNOT_SECONDARY] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.font_label.size)) { + GMT->current.setting.font_label.size = scale * 14.0; /* Modern 14p vs 10p */ + if (conf_update) GMT_keyword_updated[GMTCASE_FONT_LABEL] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.font_heading.size)) { + GMT->current.setting.font_heading.size = scale * 28.0; /* Modern 28p vs 10p */ + if (conf_update) GMT_keyword_updated[GMTCASE_FONT_HEADING] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.font_tag.size)) { + GMT->current.setting.font_tag.size = scale * 16.0; /* Modern 16p vs 10p */ + if (conf_update) GMT_keyword_updated[GMTCASE_FONT_TAG] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.font_title.size)) { + GMT->current.setting.font_title.size = scale * 22.0; /* Modern 22p vs 10p */ + if (conf_update) GMT_keyword_updated[GMTCASE_FONT_TITLE] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.font_subtitle.size)) { + GMT->current.setting.font_subtitle.size = scale * 18.0; /* Modern 18p vs 10p */ + if (conf_update) GMT_keyword_updated[GMTCASE_FONT_SUBTITLE] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.font_logo.size)) { + GMT->current.setting.font_logo.size = scale * 8.0; /* Classic 8p vs 10p */ + if (conf_update) GMT_keyword_updated[GMTCASE_FONT_LOGO] = true; + } + + /* Offsets */ + + if (gmt_M_is_dnan (GMT->current.setting.map_annot_offset[GMT_PRIMARY])) { + GMT->current.setting.map_annot_offset[GMT_PRIMARY] = 3 * pt * scale; /* 3p */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_ANNOT_OFFSET_PRIMARY] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_annot_offset[GMT_SECONDARY])) { + GMT->current.setting.map_annot_offset[GMT_SECONDARY] = 3 * pt * scale; /* 3p */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_ANNOT_OFFSET_SECONDARY] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_label_offset)) { + GMT->current.setting.map_label_offset = 6 * pt * scale; /* 6p */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_LABEL_OFFSET] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_title_offset)) { + GMT->current.setting.map_title_offset = 12 * pt * scale; /* 12p */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_TITLE_OFFSET] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_heading_offset)) { + GMT->current.setting.map_heading_offset = 16 * pt * scale; /* 16p */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_HEADING_OFFSET] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_annot_min_spacing)) { + GMT->current.setting.map_annot_min_spacing = 28 * pt * scale; /* 28p */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_ANNOT_MIN_SPACING] = true; + snprintf (GMT->current.setting.map_annot_min_spacing_txt, GMT_LEN16, "%.6gp", GMT->current.setting.map_annot_min_spacing / pt); + } + + /* Must first do map_frae_width since it may be used below */ + + if (gmt_M_is_dnan (GMT->current.setting.map_frame_width)) { + GMT->current.setting.map_frame_width = 3 * pt * scale; /* 3p */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_FRAME_WIDTH] = true; + } + + /* Tick lengths */ + + if (gmt_M_is_dnan (GMT->current.setting.map_tick_length[GMT_ANNOT_UPPER])) { + if (geo_frame && GMT->current.setting.run_mode == GMT_MODERN) { + /* Use 50% lengths but extend ticks by the width of the fancy frame */ + GMT->current.setting.map_tick_length[GMT_ANNOT_UPPER] = 2 * pt * scale + GMT->current.setting.map_frame_width; + GMT->current.setting.map_tick_length[GMT_TICK_UPPER] = 1 * pt * scale + GMT->current.setting.map_frame_width; + } + else { + GMT->current.setting.map_tick_length[GMT_ANNOT_UPPER] = 4 * pt * scale; /* 4p */ + GMT->current.setting.map_tick_length[GMT_TICK_UPPER] = 2 * pt * scale; /* 2p */ + } + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_TICK_LENGTH_PRIMARY] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_tick_length[GMT_ANNOT_LOWER])) { + if (geo_frame && GMT->current.setting.run_mode == GMT_MODERN) { + /* Use 50% lengths but extend ticks by the width of the fancy frame */ + GMT->current.setting.map_tick_length[GMT_ANNOT_LOWER] = 6 * pt * scale + GMT->current.setting.map_frame_width; + GMT->current.setting.map_tick_length[GMT_TICK_LOWER] = 1.5 * pt * scale + GMT->current.setting.map_frame_width; + } + else { + GMT->current.setting.map_tick_length[GMT_ANNOT_LOWER] = 12 * pt * scale; /* 12p */ + GMT->current.setting.map_tick_length[GMT_TICK_LOWER] = 3 * pt * scale; /* 3p */ + } + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_TICK_LENGTH_SECONDARY] = true; + } + + if (gmt_M_is_dnan (GMT->current.setting.map_polar_cap[0])) { + /* Must estimate a suitable parallel for a polar cap given area */ + double p_range = MIN (90.0 - GMT->common.R.wesn[YLO], GMT->common.R.wesn[YHI] + 90.0); /* SHortest distance from far latitude to pole */ + double f = 1.0, reach = MIN (5.0, 0.25 * p_range); /* Max 5 degrees from pole, but aim for 25% of that range */ + if (reach < 1.0) reach *= 60.0, f *= 60.0; /* Deal with sub-degree estimates and at least make them integer units */ + if (reach < 1.0) reach *= 60.0, f *= 60.0; + reach = rint (reach) / f; /* Integer degrees, minutes or seconds */ + GMT->current.setting.map_polar_cap[0] = 90.0 - reach; /* Max 5 degrees from pole */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_POLAR_CAP] = true; + } + + /* Frame, tick and gridline pens */ + + if (gmt_M_is_dnan (GMT->current.setting.map_frame_pen.width)) { + GMT->current.setting.map_frame_pen.width = 1.5 * scale; /* 1.5p (thicker) */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_FRAME_PEN] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_tick_pen[GMT_PRIMARY].width)) { + GMT->current.setting.map_tick_pen[GMT_PRIMARY].width = 0.5 * scale; /* 0.5p (thinner) */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_TICK_PEN_PRIMARY] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_tick_pen[GMT_SECONDARY].width)) { + GMT->current.setting.map_tick_pen[GMT_SECONDARY].width = 0.5 * scale; /* 0.5p (thinner) */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_TICK_PEN_SECONDARY] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_grid_pen[GMT_PRIMARY].width)) { + GMT->current.setting.map_grid_pen[GMT_PRIMARY].width = 0.25 * scale; /* 0.25p (default) */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_GRID_PEN_PRIMARY] = true; + } + if (gmt_M_is_dnan (GMT->current.setting.map_grid_pen[GMT_SECONDARY].width)) { + GMT->current.setting.map_grid_pen[GMT_SECONDARY].width = 0.5 * scale; /* 0.5p (thinner) */ + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_GRID_PEN_SECONDARY] = true; + } + + if (gmt_M_is_dnan (GMT->current.setting.map_vector_shape)) { + GMT->current.setting.map_vector_shape = 0.5; + if (conf_update) GMT_keyword_updated[GMTCASE_MAP_VECTOR_SHAPE] = true; + } +} + GMT_LOCAL unsigned int gmtinit_parse_map_annot_oblique (struct GMT_CTRL *GMT, char *text) { /* Break down a comma-separated list of keywords for MAP_ANNOT_OBLIQUE or * just return the integer if old-fashion bit-sum @@ -9715,9 +10117,13 @@ GMT_LOCAL char * gmtinit_print_map_annot_oblique (struct GMT_CTRL *GMT, unsigned return (strdup (string)); } - /*! . */ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, char *value, bool core) { + /* core is true if we are calling gmtlib_setparameter from gmtinit_loaddefaults, while it is + * false when just called once, such as via --PAR=value on the comment line. The reason is + * that when GMT_THEME=theme is given we want to wait to address the theme change until all the items + * in gmt.conf has been read, but must act right away if a single entry. */ + unsigned int pos; size_t len; int i, ival, case_val, manual, limit; @@ -9725,7 +10131,6 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha char txt_a[GMT_LEN256] = {""}, txt_b[GMT_LEN256] = {""}, txt_c[GMT_LEN256] = {""}, lower_value[GMT_BUFSIZ] = {""}; double dval; - gmt_M_unused(core); if (!value) return (1); /* value argument missing */ strncpy (lower_value, value, GMT_BUFSIZ-1); /* Get a lower case version */ @@ -9828,12 +10233,12 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha case GMTCASE_FONT: /* Special to set all fonts */ error = gmtlib_setparameter (GMT, "FONT_ANNOT_PRIMARY", value, core) + - gmtlib_setparameter (GMT, "FONT_ANNOT_SECONDARY", value, core) + - gmtlib_setparameter (GMT, "FONT_SUBTITLE", value, core) + - gmtlib_setparameter (GMT, "FONT_TITLE", value, core) + - gmtlib_setparameter (GMT, "FONT_TAG", value, core) + - gmtlib_setparameter (GMT, "FONT_HEADING", value, core) + - gmtlib_setparameter (GMT, "FONT_LABEL", value, core); + gmtlib_setparameter (GMT, "FONT_ANNOT_SECONDARY", value, core) + + gmtlib_setparameter (GMT, "FONT_SUBTITLE", value, core) + + gmtlib_setparameter (GMT, "FONT_TITLE", value, core) + + gmtlib_setparameter (GMT, "FONT_TAG", value, core) + + gmtlib_setparameter (GMT, "FONT_HEADING", value, core) + + gmtlib_setparameter (GMT, "FONT_LABEL", value, core); /* FONT_LOGO is purposely skipped */ break; case GMTCASE_FONT_ANNOT: @@ -9890,8 +10295,9 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha if (p >= 0) GMT_keyword_updated[p] = true; /* Leave a record that this keyword is no longer a default one */ } } - else + else { if (gmt_getfont (GMT, value, &GMT->current.setting.font_annot[GMT_PRIMARY])) error = true; + } break; case GMTCASE_ANNOT_FONT_SECONDARY: GMT_COMPAT_TRANSLATE ("FONT_ANNOT_SECONDARY"); @@ -10003,8 +10409,10 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha break; case GMTCASE_MAP_ANNOT_OBLIQUE: ival = gmtinit_parse_map_annot_oblique (GMT, value); - if (ival >= GMT_OBL_ANNOT_LON_X_LAT_Y && ival < GMT_OBL_ANNOT_FLAG_LIMIT) + if (ival >= GMT_OBL_ANNOT_LON_X_LAT_Y && ival < GMT_OBL_ANNOT_FLAG_LIMIT) { GMT->current.setting.map_annot_oblique = ival; + GMT->current.setting.map_annot_oblique_set = true; + } else error = true; break; @@ -10141,11 +10549,7 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha GMT_COMPAT_TRANSLATE ("MAP_FRAME_WIDTH"); break; case GMTCASE_MAP_FRAME_WIDTH: - dval = gmt_M_to_inch (GMT, value); - if (dval > 0.0) - GMT->current.setting.map_frame_width = dval; - else - error = true; + GMT->current.setting.map_frame_width = gmt_M_to_inch (GMT, value); break; case GMTCASE_GRID_CROSS_SIZE_PRIMARY: GMT_COMPAT_TRANSLATE ("MAP_GRID_CROSS_SIZE_PRIMARY"); @@ -10248,6 +10652,10 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha GMT->current.setting.map_polar_cap[0] = 90.0; GMT->current.setting.map_polar_cap[1] = 0.0; } + else if (!strcmp (lower_value, "auto")) { /* Means reset cap pending region */ + GMT->current.setting.map_polar_cap[0] = GMT->session.d_NaN; + GMT->current.setting.map_polar_cap[1] = 90.0; + } else { double inc[2]; i = sscanf (lower_value, "%[^/]/%s", txt_a, txt_b); @@ -11160,6 +11568,17 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha else error = true; break; + case GMTCASE_GMT_THEME: + if (strlen (value) < GMT_LEN64) { + strncpy (GMT->current.setting.theme, value, GMT_LEN64-1); + GMT->current.setting.update_theme = (strcmp (GMT->current.setting.theme, "off") != 0); + error = gmtinit_update_theme (GMT); + } + else { + GMT_Report (GMT->parent, GMT_MSG_ERROR, "GMT_THEME must be less than %d characters\n", GMT_LEN64); + error = true; + } + break; case GMTCASE_VERBOSE: if (gmt_M_compat_check (GMT, 4)) { /* GMT4: */ GMT_COMPAT_CHANGE ("GMT_VERBOSE"); @@ -11340,8 +11759,15 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha return ((error) ? 1 : 0); } +GMT_LOCAL void gmtinit_place_value (struct GMT_CTRL *GMT, double dim, int kase, char *value) { + if (gmt_M_is_dnan (dim)) + snprintf (value, GMT_LEN256, "auto"); + else + snprintf (value, GMT_LEN256, "%g%c", dim * GMT_def_scale(kase), GMT_def_unit(kase)); +} + /*! . */ -char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { +char *gmtlib_getparameter (struct GMT_CTRL *GMT, const char *keyword) { /* value must hold at least GMT_BUFSIZ chars */ static char value[GMT_BUFSIZ] = {""}, txt[GMT_LEN8], *PRE[3] = {"", "-", "+"}, *string = NULL; int case_val; @@ -11546,7 +11972,7 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_ANNOT_OFFSET_PRIMARY: - snprintf (value, GMT_LEN256, "%g%c", GMT->current.setting.map_annot_offset[GMT_PRIMARY] * GMT_def_scale(GMTCASE_MAP_ANNOT_OFFSET_PRIMARY), GMT_def_unit(GMTCASE_MAP_ANNOT_OFFSET_PRIMARY)); + gmtinit_place_value (GMT, GMT->current.setting.map_annot_offset[GMT_PRIMARY], GMTCASE_MAP_ANNOT_OFFSET_PRIMARY, value); break; case GMTCASE_ANNOT_OFFSET_SECONDARY: if (gmt_M_compat_check (GMT, 4)) /* GMT4: */ @@ -11554,7 +11980,7 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_ANNOT_OFFSET_SECONDARY: - snprintf (value, GMT_LEN256, "%g%c", GMT->current.setting.map_annot_offset[GMT_SECONDARY] * GMT_def_scale(GMTCASE_MAP_ANNOT_OFFSET_SECONDARY), GMT_def_unit(GMTCASE_MAP_ANNOT_OFFSET_SECONDARY)); + gmtinit_place_value (GMT, GMT->current.setting.map_annot_offset[GMT_SECONDARY], GMTCASE_MAP_ANNOT_OFFSET_SECONDARY, value); break; case GMTCASE_OBLIQUE_ANNOTATION: if (gmt_M_compat_check (GMT, 4)) /* GMT4: */ @@ -11580,7 +12006,7 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_ANNOT_MIN_SPACING: - snprintf (value, GMT_LEN256, "%g%c", GMT->current.setting.map_annot_min_spacing * GMT_def_scale(GMTCASE_MAP_ANNOT_MIN_SPACING), GMT_def_unit(GMTCASE_MAP_ANNOT_MIN_SPACING)); + gmtinit_place_value (GMT, GMT->current.setting.map_annot_min_spacing, GMTCASE_MAP_ANNOT_MIN_SPACING, value); break; case GMTCASE_Y_AXIS_TYPE: if (gmt_M_compat_check (GMT, 4)) /* GMT4: */ @@ -11668,7 +12094,7 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_FRAME_WIDTH: - snprintf (value, GMT_LEN256, "%g%c", GMT->current.setting.map_frame_width * GMT_def_scale(GMTCASE_MAP_FRAME_WIDTH), GMT_def_unit(GMTCASE_MAP_FRAME_WIDTH)); + gmtinit_place_value (GMT, GMT->current.setting.map_frame_width, GMTCASE_MAP_FRAME_WIDTH, value); break; case GMTCASE_GRID_CROSS_SIZE_PRIMARY: if (gmt_M_compat_check (GMT, 4)) /* GMT4: */ @@ -11703,7 +12129,7 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { snprintf (value, GMT_LEN256, "%s", gmt_putpen (GMT, &GMT->current.setting.map_grid_pen[GMT_SECONDARY])); break; case GMTCASE_MAP_HEADING_OFFSET: - snprintf (value, GMT_LEN256, "%g%c", GMT->current.setting.map_heading_offset * GMT_def_scale(GMTCASE_MAP_HEADING_OFFSET), GMT_def_unit(GMTCASE_MAP_HEADING_OFFSET)); + gmtinit_place_value (GMT, GMT->current.setting.map_heading_offset, GMTCASE_MAP_HEADING_OFFSET, value); break; case GMTCASE_LABEL_OFFSET: if (gmt_M_compat_check (GMT, 4)) /* GMT4: */ @@ -11711,7 +12137,7 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_LABEL_OFFSET: - snprintf (value, GMT_LEN256, "%g%c", GMT->current.setting.map_label_offset * GMT_def_scale(GMTCASE_MAP_LABEL_OFFSET), GMT_def_unit(GMTCASE_MAP_LABEL_OFFSET)); + gmtinit_place_value (GMT, GMT->current.setting.map_label_offset, GMTCASE_MAP_LABEL_OFFSET, value); break; case GMTCASE_LINE_STEP: if (gmt_M_compat_check (GMT, 4)) /* GMT4: */ @@ -11761,7 +12187,9 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_POLAR_CAP: - if (doubleAlmostEqual (GMT->current.setting.map_polar_cap[0], 90.0)) + if (gmt_M_is_dnan (GMT->current.setting.map_polar_cap[0])) + snprintf (value, GMT_LEN256, "auto"); + else if (doubleAlmostEqual (GMT->current.setting.map_polar_cap[0], 90.0)) snprintf (value, GMT_LEN256, "none"); else snprintf (value, GMT_LEN256, "%g/%g", GMT->current.setting.map_polar_cap[0], GMT->current.setting.map_polar_cap[1]); @@ -11776,14 +12204,22 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_TICK_LENGTH_PRIMARY: - snprintf (value, GMT_LEN256, "%g%c/%g%c", - GMT->current.setting.map_tick_length[GMT_ANNOT_UPPER] * GMT_def_scale(GMTCASE_MAP_TICK_LENGTH_PRIMARY), GMT_def_unit(GMTCASE_MAP_TICK_LENGTH_PRIMARY), - GMT->current.setting.map_tick_length[GMT_TICK_UPPER] * GMT_def_scale(GMTCASE_MAP_TICK_LENGTH_PRIMARY), GMT_def_unit(GMTCASE_MAP_TICK_LENGTH_PRIMARY)); + if (gmt_M_is_dnan (GMT->current.setting.map_tick_length[GMT_ANNOT_UPPER])) + snprintf (value, GMT_LEN256, "auto"); + else { + snprintf (value, GMT_LEN256, "%g%c/%g%c", + GMT->current.setting.map_tick_length[GMT_ANNOT_UPPER] * GMT_def_scale(GMTCASE_MAP_TICK_LENGTH_PRIMARY), GMT_def_unit(GMTCASE_MAP_TICK_LENGTH_PRIMARY), + GMT->current.setting.map_tick_length[GMT_TICK_UPPER] * GMT_def_scale(GMTCASE_MAP_TICK_LENGTH_PRIMARY), GMT_def_unit(GMTCASE_MAP_TICK_LENGTH_PRIMARY)); + } break; case GMTCASE_MAP_TICK_LENGTH_SECONDARY: - snprintf (value, GMT_LEN256, "%g%c/%g%c", - GMT->current.setting.map_tick_length[GMT_ANNOT_LOWER] * GMT_def_scale(GMTCASE_MAP_TICK_LENGTH_SECONDARY), GMT_def_unit(GMTCASE_MAP_TICK_LENGTH_SECONDARY), - GMT->current.setting.map_tick_length[GMT_TICK_LOWER] * GMT_def_scale(GMTCASE_MAP_TICK_LENGTH_SECONDARY), GMT_def_unit(GMTCASE_MAP_TICK_LENGTH_SECONDARY)); + if (gmt_M_is_dnan (GMT->current.setting.map_tick_length[GMT_ANNOT_LOWER])) + snprintf (value, GMT_LEN256, "auto"); + else { + snprintf (value, GMT_LEN256, "%g%c/%g%c", + GMT->current.setting.map_tick_length[GMT_ANNOT_LOWER] * GMT_def_scale(GMTCASE_MAP_TICK_LENGTH_SECONDARY), GMT_def_unit(GMTCASE_MAP_TICK_LENGTH_SECONDARY), + GMT->current.setting.map_tick_length[GMT_TICK_LOWER] * GMT_def_scale(GMTCASE_MAP_TICK_LENGTH_SECONDARY), GMT_def_unit(GMTCASE_MAP_TICK_LENGTH_SECONDARY)); + } break; case GMTCASE_MAP_TICK_PEN: case GMTCASE_TICK_PEN: @@ -11803,7 +12239,7 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_TITLE_OFFSET: - snprintf (value, GMT_LEN256, "%g%c", GMT->current.setting.map_title_offset * GMT_def_scale(GMTCASE_MAP_TITLE_OFFSET), GMT_def_unit(GMTCASE_MAP_TITLE_OFFSET)); + gmtinit_place_value (GMT, GMT->current.setting.map_title_offset, GMTCASE_MAP_TITLE_OFFSET, value); break; case GMTCASE_VECTOR_SHAPE: if (gmt_M_compat_check (GMT, 4)) /* GMT4: */ @@ -11811,7 +12247,10 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { else { error = gmtinit_badvalreport (GMT, keyword); break; } /* Not recognized so give error message */ /* Intentionally fall through */ case GMTCASE_MAP_VECTOR_SHAPE: - snprintf (value, GMT_LEN256, "%g", GMT->current.setting.map_vector_shape); + if (gmt_M_is_dnan (GMT->current.setting.map_vector_shape)) + snprintf (value, GMT_LEN256, "auto"); + else + snprintf (value, GMT_LEN256, "%g", GMT->current.setting.map_vector_shape); break; /* COLOR GROUP */ @@ -12412,6 +12851,9 @@ char *gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword) { strncpy (value, GMT->current.setting.language, GMT_LEN64-1); gmtinit_get_language (GMT); /* Load in names and abbreviations in chosen language */ break; + case GMTCASE_GMT_THEME: + strncpy (value, GMT->current.setting.theme, GMT_LEN256-1); + break; case GMTCASE_GMT_TRIANGULATE: if (GMT->current.setting.triangulate == GMT_TRIANGLE_WATSON) strcpy (value, "Watson"); @@ -12534,7 +12976,7 @@ int gmt_pickdefaults (struct GMT_CTRL *GMT, bool lines, struct GMT_OPTION *optio if (lines) record[0] = '\0'; /* Start over */ if (!lines && n) strcat (record, " "); /* Separate by spaces */ - param = gmtlib_putparameter (GMT, opt->arg); + param = gmtlib_getparameter (GMT, opt->arg); if (*param == '\0') { /* if keyword unknown */ error = GMT_OPTION_NOT_FOUND; @@ -12701,6 +13143,8 @@ double gmt_convert_units (struct GMT_CTRL *GMT, char *string, unsigned int defau bool have_unit = false; double value; + if (string && strncmp (string, "auto", 4U) == 0) return GMT->session.d_NaN; /* Auto in gmt.conf settings means undefined = NaN */ + if ((len = (int)strlen(string))) { c = string[len-1]; if ((have_unit = isalpha ((int)c))) string[len-1] = '\0'; /* Temporarily remove unit */ @@ -13067,6 +13511,9 @@ GMT_LOCAL struct GMT_CTRL *gmtinit_begin_module_sub (struct GMTAPI_CTRL *API, co GMT->init.module_name = mod_name; GMT->init.module_lib = lib_name; + if (gmt_M_is_dnan (GMT->current.setting.map_vector_shape)) /* Do it here since independent on map size */ + GMT->current.setting.map_vector_shape = 0.5; + return (GMT); } @@ -13848,6 +14295,7 @@ GMT_LOCAL int gmtinit_set_modern_mode_if_oneliner (struct GMTAPI_CTRL *API, stru } API->GMT->hidden.func_level++; /* Must do this here since it has not yet been increased by gmtinit_begin_module_sub ! */ gmt_reset_history (API->GMT); /* A one-liner should have no history */ + gmtinit_conf_modern_override (API->GMT); if ((error = GMT_Call_Module (API, "begin", GMT_MODULE_CMD, session))) { GMT_Report (API, GMT_MSG_ERROR, "Unable to call module begin from gmtinit_set_modern_mode_if_oneliner.\n"); @@ -14064,10 +14512,16 @@ GMT_LOCAL bool gmtinit_build_new_J_option (struct GMTAPI_CTRL *API, struct GMT_O * an empty file called gmt.B... after applying -B, and once that file * exist we do not apply -B again. */ +void gmtlib_panel_B_file (struct GMTAPI_CTRL *API, int fig, int row, int col, char *file) { + /* Create the B_setting file name for this subplot panel */ + sprintf (file, "%s/gmt.B.%d.%d.%d", API->gwf_dir, fig, row, col); +} + GMT_LOCAL void gmtinit_panel_B_set (struct GMTAPI_CTRL *API, int fig, int row, int col) { /* Mark that -B options have been applied for this subplot panel */ char Bfile[PATH_MAX] = {""}; FILE *fp = NULL; + gmtlib_panel_B_file (API, fig, row, col, Bfile); sprintf (Bfile, "%s/gmt.B.%d.%d.%d", API->gwf_dir, fig, row, col); if ((fp = fopen (Bfile, "w"))) fclose (fp); } @@ -14075,7 +14529,7 @@ GMT_LOCAL void gmtinit_panel_B_set (struct GMTAPI_CTRL *API, int fig, int row, i GMT_LOCAL bool gmtinit_panel_B_get (struct GMTAPI_CTRL *API, int fig, int row, int col) { /* Determine if -B options have been applied to this panel before */ char Bfile[PATH_MAX] = {""}; - sprintf (Bfile, "%s/gmt.B.%d.%d.%d", API->gwf_dir, fig, row, col); + gmtlib_panel_B_file (API, fig, row, col, Bfile); if (access (Bfile, F_OK) == 0) { /* Return true if file is found */ GMT_Report (API, GMT_MSG_DEBUG, "B already set for fig %d subplot panel (%d, %d)\n", fig, row, col); return true; @@ -18065,7 +18519,7 @@ void gmt_add_legend_item (struct GMTAPI_CTRL *API, struct GMT_SYMBOL *S, bool do * +N corresponds to command N in the legend codes and changes the number of columns. * +S sets symbol size or line length for symbols that otherwise won't have a dimension. * +V corresponds to command V in the legend codes and starts/ends a vertical line. - * +f sets the font to use the header string [FONT_HEADER]. + * +f sets the font to use the header string [FONT_TITLE]. * +g sets the frame fill [white]. * +j -Dj?? as to where to place legend * +o sets the frame offset [0.2c]. @@ -18305,7 +18759,7 @@ int gmt_manage_workflow (struct GMTAPI_CTRL *API, unsigned int mode, char *text) if (error) return (error); /* Bail at this point */ gmt_reset_history (API->GMT); /* No old classic history shall affect a new modern mode session */ - gmt_conf (API->GMT); /* Get the GMT system defaults */ + gmt_conf_SI (API->GMT); /* Get the original system defaults */ if (!clean_start) { /* Overload any user-supplied defaults via a gmt.conf file but reset PS_MEDIA to the original system default */ if (gmt_getdefaults (API->GMT, NULL) == GMT_NOERROR) /* Ingested a gmt.conf file */ @@ -18439,11 +18893,14 @@ void gmt_auto_offsets_for_colorbar (struct GMT_CTRL *GMT, double offset[], int j char side, axis, B_delim[2] = {30, 0}, p[GMT_BUFSIZ] = {""}; /* Use ASCII 30 RS Record Separator between -B strings */ char file[PATH_MAX] = {""}; - unsigned int pos = 0; - bool add_label = false, add_annot = false, axis_set = false; + char *frame_axes = (!strcmp (GMT->current.setting.map_frame_axes, "auto")) ? "WrStZ" : GMT->current.setting.map_frame_axes; + unsigned int pos = 0, sides[5]; + bool add_label = false, add_annot = false, axis_set = false, was; double GMT_LETTER_HEIGHT = 0.736; FILE *fp = NULL; /* Initialize the default settings before considering any -B history */ + gmt_set_undefined_defaults (GMT, 0.0, false); /* Must set undefined to their reference values for now */ + offset[GMT_OUT] = GMT->current.setting.map_label_offset + GMT->current.setting.map_frame_width; offset[GMT_IN] = GMT->current.setting.map_label_offset; @@ -18473,7 +18930,7 @@ void gmt_auto_offsets_for_colorbar (struct GMT_CTRL *GMT, double offset[], int j } } /* If -BWE.. was not set we must rely on MAP_FRAME_AXES default setting */ - if (!axis_set && strchr (GMT->current.setting.map_frame_axes, side)) add_annot = true; + if (!axis_set && strchr (frame_axes, side)) add_annot = true; if (add_label && gmt_M_is_geographic (GMT, GMT_IN)) add_label = false; /* Not allowed anyway */ /* Time to make updates, if any */ if (add_annot) { @@ -18485,6 +18942,12 @@ void gmt_auto_offsets_for_colorbar (struct GMT_CTRL *GMT, double offset[], int j GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Adding label space\n"); offset[GMT_OUT] += (GMT_LETTER_HEIGHT * GMT->current.setting.font_label.size / PSL_POINTS_PER_INCH) + MAX (0.0, GMT->current.setting.map_label_offset); } + /* Because the next call will reset frame sides i will make a copy and override the override here */ + gmt_M_memcpy (sides, GMT->current.map.frame.side, 5U, unsigned int); + was = GMT->current.map.frame.draw; + gmtinit_conf_modern_override (GMT); /* Reset */ + gmt_M_memcpy (GMT->current.map.frame.side, sides, 5U, unsigned int); + GMT->current.map.frame.draw = was; } unsigned int gmt_count_char (struct GMT_CTRL *GMT, char *txt, char it) { diff --git a/src/gmt_internals.h b/src/gmt_internals.h index 5d2ba9ae659..6251cfe2ae0 100644 --- a/src/gmt_internals.h +++ b/src/gmt_internals.h @@ -130,7 +130,7 @@ EXTERN_MSC char * gmtlib_putcmyk (struct GMT_CTRL *GMT, double *cmyk); EXTERN_MSC char * gmtlib_puthsv (struct GMT_CTRL *GMT, double *hsv); EXTERN_MSC enum gmt_enum_units gmtlib_get_unit_number (struct GMT_CTRL *GMT, char unit); EXTERN_MSC void gmtlib_explain_options (struct GMT_CTRL *GMT, char *options); -EXTERN_MSC char * gmtlib_putparameter (struct GMT_CTRL *GMT, const char *keyword); +EXTERN_MSC char * gmtlib_getparameter (struct GMT_CTRL *GMT, const char *keyword); EXTERN_MSC unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, char *value, bool core); EXTERN_MSC int gmtlib_report_func (struct GMT_CTRL *GMT, unsigned int level, const char *source_line, const char *format, ...); EXTERN_MSC int gmtlib_get_num_processors (); diff --git a/src/gmt_keywords.txt b/src/gmt_keywords.txt index 231b8161afa..dd5b0f78130 100644 --- a/src/gmt_keywords.txt +++ b/src/gmt_keywords.txt @@ -73,6 +73,7 @@ GMT_HISTORY # Should we update the command history? GMT_INTERPOLANT # Spline interpolant GMT_LANGUAGE # Language used for annotations GMT_MAX_CORES # Maximum number of cores a multi-threaded module can use [0 = all available] +GMT_THEME # Group of GMT defaults to override GMT_TRIANGULATE # Triangulation algorithm GMT_VERBOSE # Verbosity level #------------------------------------------------------- diff --git a/src/gmt_map.c b/src/gmt_map.c index 73a1bdec6c4..ca97cb19699 100644 --- a/src/gmt_map.c +++ b/src/gmt_map.c @@ -2209,6 +2209,7 @@ GMT_LOCAL void gmtmap_setxy (struct GMT_CTRL *GMT, double xmin, double xmax, dou update_parameters = true; GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Rescaling map for subplot by factors fx = %g fy = %g dx = %g dy = %g\n", fx, fy, P->dx, P->dy); if (gmt_M_is_rect_graticule (GMT) && P->parallel) { + GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Force parallel latitude annotations\n"); strcpy (GMT->current.setting.map_annot_ortho, ""); /* All annotations will be parallel to axes */ GMT->current.setting.map_annot_oblique |= GMT_OBL_ANNOT_LAT_PARALLEL; /* Plot latitude parallel to frame for geo maps */ } @@ -6700,6 +6701,16 @@ void gmt_auto_frame_interval (struct GMT_CTRL *GMT, unsigned int axis, unsigned d = fabs (GMT->common.R.wesn[ZHI] - GMT->common.R.wesn[ZLO]); } f *= GMT->session.u2u[GMT_INCH][GMT_PT]; /* Change to points */ + +#ifndef NO_THEMES + if (GMT->current.setting.run_mode == GMT_MODERN && gmt_M_axis_is_geo (GMT, axis)) { /* Need more space for degree symbol and WESN letters not considered in the algorithm */ + if (strchr (GMT->current.setting.format_geo_map, 'F')) /* Need more space for degree symbol and letter */ + d *= 1.75; + else /* Just more space for degree symbol */ + d *= 1.25; + } +#endif + /* First guess of interval */ d *= MAX (0.05, MIN (5.0 * GMT->current.setting.font_annot[item].size / f, 0.20)); @@ -9315,6 +9326,19 @@ unsigned int gmtlib_map_loncross (struct GMT_CTRL *GMT, double lon, double south return (nc); } +void gmtmap_reset_oblique_settings (struct GMT_CTRL *GMT) { + /* The modern mode default for MAP_ANNOT_OBLIQUE has settings that only makes sense for oblique plots with rectangular borders. + * Thus, if the current projection is not like that then we reset the default to a more benign default setting. However, if + * the user has actively changed the MAP_ANNOT_OBLIQUE value then we do nothing. */ + + if (GMT->current.setting.map_annot_oblique_set) return; /* User changed MAP_ANNOT_OBLIQUE so we cannot reset anything */ + if (GMT->common.R.oblique) return; /* These are the appropriate defaults for oblique projections with rectangular borders */ + + GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Reset MAP_ANNOT_OBLIQUE to anywhere\n"); + + GMT->current.setting.map_annot_oblique = GMT_OBL_ANNOT_ANYWHERE; /* Reset to non-oblique map defaults */ +} + int gmt_proj_setup (struct GMT_CTRL *GMT, double wesn[]) { /* Core map setup function for the projection. All program needing projection support * will call this either directly or indirectly. Programs that _just_ need to project @@ -9406,6 +9430,8 @@ int gmt_proj_setup (struct GMT_CTRL *GMT, double wesn[]) { GMT->current.map.lat_wrap = false; GMT->current.map.lon_wrap_range = 360.0; + gmtmap_reset_oblique_settings (GMT); /* Maybe reset MAP_ANNOT_OBLIQUE defaults depending on situation */ + switch (GMT->current.proj.projection) { case GMT_LINEAR: /* Linear transformations */ @@ -9572,6 +9598,8 @@ int gmt_map_setup (struct GMT_CTRL *GMT, double wesn[]) { if ((error = gmt_proj_setup (GMT, wesn)) != GMT_NOERROR) goto gmt_map_setup_end; + gmt_set_undefined_defaults (GMT, sqrt (GMT->current.map.width * GMT->current.map.height), false); /* We must change any undefined defaults given max plot dimension */ + search = GMT->current.proj.search; /* If intervals are not set specifically, round them to some "nice" values diff --git a/src/gmt_plot.c b/src/gmt_plot.c index 24b3a320386..7f62ed2d936 100644 --- a/src/gmt_plot.c +++ b/src/gmt_plot.c @@ -8431,6 +8431,8 @@ struct PSL_CTRL *gmt_plotinit (struct GMT_CTRL *GMT, struct GMT_OPTION *options) PSL = GMT->PSL; /* Shorthand */ + gmt_set_undefined_defaults (GMT, sqrt (GMT->current.map.width * GMT->current.map.height), false); /* We must change any undefined defaults given max plot dimension */ + if (GMT->current.map.frame.paint[GMT_Z]) { /* Must squirrel this away for now since we may call psbasemap during the movie-indicators below */ do_paint = true; gmt_M_memcpy (&fill, &GMT->current.map.frame.fill[GMT_Z], 1U, struct GMT_FILL); diff --git a/src/gmt_prototypes.h b/src/gmt_prototypes.h index 7272ce9f291..d0f05184e27 100644 --- a/src/gmt_prototypes.h +++ b/src/gmt_prototypes.h @@ -49,6 +49,8 @@ EXTERN_MSC int gmt_nc_create (struct GMT_CTRL *GMT, char *path, int mode, int *i /* gmt_init.c: */ +EXTERN_MSC void gmt_set_undefined_axes (struct GMT_CTRL *GMT, bool conf_update); +EXTERN_MSC void gmt_set_undefined_defaults (struct GMT_CTRL *GMT, double plot_dim, bool conf_update); EXTERN_MSC bool gmt_parse_s_option (struct GMT_CTRL *GMT, char *item); EXTERN_MSC unsigned int gmt_parse_d_option (struct GMT_CTRL *GMT, char *arg); EXTERN_MSC int gmt_parse_g_option (struct GMT_CTRL *GMT, char *txt); @@ -71,8 +73,8 @@ EXTERN_MSC void gmt_auto_offsets_for_colorbar (struct GMT_CTRL *GMT, double offs EXTERN_MSC struct GMT_SUBPLOT * gmt_subplot_info (struct GMTAPI_CTRL *API, int fig); EXTERN_MSC int gmt_get_V (char arg); EXTERN_MSC char gmt_set_V (int mode); +EXTERN_MSC void gmt_conf_SI (struct GMT_CTRL *GMT); EXTERN_MSC void gmt_conf_US (struct GMT_CTRL *GMT); -EXTERN_MSC void gmt_conf (struct GMT_CTRL *GMT); EXTERN_MSC int gmt_truncate_file (struct GMTAPI_CTRL *API, char *file, size_t size); EXTERN_MSC int gmt_set_current_panel (struct GMTAPI_CTRL *API, int fig, int row, int col, double gap[], char *label, unsigned int first); EXTERN_MSC int gmt_get_current_figure (struct GMTAPI_CTRL *API); diff --git a/src/gmt_support.c b/src/gmt_support.c index da644178efb..5880c9ab5c7 100644 --- a/src/gmt_support.c +++ b/src/gmt_support.c @@ -979,6 +979,8 @@ GMT_LOCAL int gmtsupport_pen2name (double width) { int i, k; + if (gmt_M_is_dnan (width)) return -2; /* Pen width undefined */ + for (i = 0, k = GMT_NOTSET; k < 0 && i < GMT_N_PEN_NAMES; i++) if (gmt_M_eq (width, GMT_penname[i].width)) k = i; return (k); @@ -995,6 +997,8 @@ GMT_LOCAL int gmtsupport_getpenwidth (struct GMT_CTRL *GMT, char *line, struct G /* Pen thickness with optional unit at end */ P->width = gmt_convert_units (GMT, line, GMT_PT, GMT_PT); } + else if (!strcmp (line, "auto")) + P->width = GMT->session.d_NaN; else { /* Pen name was given - these refer to fixed widths in points */ if ((n = gmtsupport_name2pen (line)) < 0) { GMT_Report (GMT->parent, GMT_MSG_ERROR, "Pen name %s not recognized!\n", line); @@ -6672,8 +6676,10 @@ int gmt_getfont (struct GMT_CTRL *GMT, char *buffer, struct GMT_FONT *F) { /* Assign font size, type, and fill, if given */ if (!size[0] || size[0] == '-') { /* Skip */ } + else if (!strncmp (size, "auto", 4U)) + F->size = GMT->session.d_NaN; else if ((pointsize = gmt_convert_units (GMT, size, GMT_PT, GMT_PT)) < GMT_CONV4_LIMIT) - GMT_Report (GMT->parent, GMT_MSG_WARNING, "Representation of font size not recognised. Using default.\n"); + GMT_Report (GMT->parent, GMT_MSG_WARNING, "Representation of font size not recognized. Using default.\n"); else F->size = pointsize; if (!name[0] || name[0] == '-') { /* Skip */ } @@ -6703,15 +6709,21 @@ char *gmt_putfont (struct GMT_CTRL *GMT, struct GMT_FONT *F) { /* gmt_putfont creates a GMT textstring equivalent of the specified font */ static char text[GMT_BUFSIZ]; + char size[GMT_LEN32] = {""}; + + if (gmt_M_is_dnan (F->size)) + snprintf (size, GMT_LEN32, "auto,"); + else + snprintf (size, GMT_LEN32, "%gp,", F->size); if (F->form & 2) { if (F->form & 8) - snprintf (text, GMT_BUFSIZ, "%gp,%s,%s=~%s", F->size, GMT->session.font[F->id].name, gmtlib_putfill (GMT, &F->fill), gmt_putpen (GMT, &F->pen)); + snprintf (text, GMT_BUFSIZ, "%s%s,%s=~%s", size, GMT->session.font[F->id].name, gmtlib_putfill (GMT, &F->fill), gmt_putpen (GMT, &F->pen)); else - snprintf (text, GMT_BUFSIZ, "%gp,%s,%s=%s", F->size, GMT->session.font[F->id].name, gmtlib_putfill (GMT, &F->fill), gmt_putpen (GMT, &F->pen)); + snprintf (text, GMT_BUFSIZ, "%s%s,%s=%s", size, GMT->session.font[F->id].name, gmtlib_putfill (GMT, &F->fill), gmt_putpen (GMT, &F->pen)); } else - snprintf (text, GMT_BUFSIZ, "%gp,%s,%s", F->size, GMT->session.font[F->id].name, gmtlib_putfill (GMT, &F->fill)); + snprintf (text, GMT_BUFSIZ, "%s%s,%s", size, GMT->session.font[F->id].name, gmtlib_putfill (GMT, &F->fill)); return (text); } @@ -6925,18 +6937,22 @@ char *gmt_putpen (struct GMT_CTRL *GMT, struct GMT_PEN *P) { k = gmtsupport_pen2name (P->width); if (P->style[0]) { - if (k < 0) + if (k == -2) /* Width is undefined */ + snprintf (text, GMT_BUFSIZ, "%s,%s:%.5gp", gmt_putcolor (GMT, P->rgb), P->style, P->offset); + else if (k == -1) /* Width has no name */ snprintf (text, GMT_BUFSIZ, "%.5gp,%s,%s:%.5gp", P->width, gmt_putcolor (GMT, P->rgb), P->style, P->offset); - else + else /* Named pen width */ snprintf (text, GMT_BUFSIZ, "%s,%s,%s:%.5gp", GMT_penname[k].name, gmt_putcolor (GMT, P->rgb), P->style, P->offset); for (i = 0; text[i]; i++) if (text[i] == ' ') text[i] = '_'; } - else - if (k < 0) + else { + if (k == -2) /* Width is undefined */ + snprintf (text, GMT_BUFSIZ, "%s", gmt_putcolor (GMT, P->rgb)); + else if (k == -1) /* Width has no name */ snprintf (text, GMT_BUFSIZ, "%.5gp,%s", P->width, gmt_putcolor (GMT, P->rgb)); - else + else /* Named pen width */ snprintf (text, GMT_BUFSIZ, "%s,%s", GMT_penname[k].name, gmt_putcolor (GMT, P->rgb)); - + } return (text); } diff --git a/src/gmtdefaults.c b/src/gmtdefaults.c index 38d8f4a4214..5648cdd157c 100644 --- a/src/gmtdefaults.c +++ b/src/gmtdefaults.c @@ -144,7 +144,7 @@ EXTERN_MSC int GMT_gmtdefaults (void *V_API, int mode, void *args) { /*---------------------------- This is the gmtdefaults main code ----------------------------*/ if (Ctrl->D.active) { /* Start with default params using SI settings */ - gmt_conf (GMT); /* Get SI defaults */ + gmt_conf_SI (GMT); /* Get SI defaults */ if (Ctrl->D.mode == 'u') gmt_conf_US (GMT); /* Change a few to US defaults */ } diff --git a/src/gmtset.c b/src/gmtset.c index e0dba9c4897..9765831e384 100644 --- a/src/gmtset.c +++ b/src/gmtset.c @@ -179,6 +179,8 @@ EXTERN_MSC int GMT_gmtset (void *V_API, int mode, void *args) { if (gmt_setdefaults (GMT, options)) Return (GMT_PARSE_ERROR); /* Process command line arguments, return error if failures */ + strcpy (GMT->current.setting.theme, "off"); /* To preserve changes the user may have set */ + gmt_putdefaults (GMT, Ctrl->G.file); /* Write out the revised settings */ Return (GMT_NOERROR); diff --git a/src/psbasemap.c b/src/psbasemap.c index e4cd005a71d..f375fab4266 100644 --- a/src/psbasemap.c +++ b/src/psbasemap.c @@ -52,6 +52,7 @@ struct PSBASEMAP_CTRL { } F; struct PSBASEMAP_L { /* -L[g|j|n|x]+c[/]+w[e|f|M|n|k|u][+a][+f][+l[