diff --git a/gmtsph-profile.sh b/gmtsph-profile.sh old mode 100644 new mode 100755 index c29ecbb..46a3ce7 --- a/gmtsph-profile.sh +++ b/gmtsph-profile.sh @@ -76,12 +76,13 @@ else MAP_GRID_CROSS_SIZE_PRIMARY=2p \ FONT_LABEL=7p,Times-Roman,black \ MAP_FRAME_AXES=wEsNZ \ + COLOR_NAN=white \ MAP_LABEL_OFFSET=4p - gmt grd2cpt ${data} -C${color} -Z -D > $cptfile + gmt grd2cpt ${data} -C${color} -Z -D -M > $cptfile gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JPa3i/${offangle}z -K -Y1i -P > $psfile gmt psscale -Dx0.4i/-0.25i+w2.2i/0.1i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile - gmt psconvert $psfile -A -TeG -E300 + gmt psconvert $psfile -A -TEG -E300 # 删除临时文件 使用linux终端rm命令 rm $cptfile $psfile gmt.history gmt.conf if [[ $plotgrad == 1 ]]; then diff --git a/sph_global.sh b/sph_global.sh old mode 100644 new mode 100755 index 96ade31..e2b27d1 --- a/sph_global.sh +++ b/sph_global.sh @@ -81,7 +81,7 @@ else fi #-C${cptfile}+Uk 使用km(色标单位除1000) gmt psscale -Dx0.5i/-0.3i+w2i/0.07i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile - gmt psconvert $psfile -A -TeG -E300 + gmt psconvert $psfile -A -TEG -E300 # 删除临时文件 使用linux终端rm命令 rm $cptfile $psfile gmt.history gmt.conf if [[ $plotgrad == 1 ]]; then diff --git a/sph_global_dot.sh b/sph_global_dot.sh old mode 100644 new mode 100755 index 46ac1a4..638c401 --- a/sph_global_dot.sh +++ b/sph_global_dot.sh @@ -79,7 +79,7 @@ else gmt psxy ${data} -i${cols} -Bxag+l"${labels[0]}" -B+ggrey -Bpya40g40+l"${labels[1]}" -JN0/3i -R${range} -C${cptfile} -Sc0.04c -Gblack -P -K > $psfile #-C${cptfile}+Uk 使用km(色标单位除1000) gmt psscale -Dx0.5i/-0.3i+w2i/0.07i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile - gmt psconvert $psfile -A -TeG -E300 + gmt psconvert $psfile -A -TEG -E300 # 删除临时文件 使用linux终端rm命令 rm $cptfile $psfile gmt.history gmt.conf # 在终端显示图像 此命令需要imgcat.sh脚本和iTerm终端 diff --git a/sph_regional.sh b/sph_regional.sh old mode 100644 new mode 100755 index d840e6f..437ad24 --- a/sph_regional.sh +++ b/sph_regional.sh @@ -13,7 +13,7 @@ labels=("longitude (degree)" "latitude (degree)") plot_para=(0 0 0 0) plotgrad=0 # 从命令行获取参数 -while getopts "hi:r:u:c:a:g" arg +while getopts "hi:r:u:c:a:gv:" arg do case $arg in h) @@ -74,28 +74,29 @@ else fi # 设置绘图参数 gmt gmtset \ - FONT_ANNOT_PRIMARY=6.5p,Times-Roman,black \ + FONT_ANNOT_PRIMARY=8p,Times-Roman,black \ MAP_FRAME_PEN=thinnest,black \ MAP_FRAME_WIDTH=1.5p \ MAP_TICK_LENGTH_PRIMARY=1.5p/1p \ MAP_TICK_PEN_PRIMARY=thinnest,black \ MAP_TITLE_OFFSET=6.5p \ MAP_GRID_PEN_PRIMARY=thinnest,grey,-- \ - FONT_LABEL=6.5p,Times-Roman,black \ + FONT_LABEL=8p,Times-Roman,black \ MAP_FRAME_AXES=WESnZ \ + COLOR_NAN=black \ MAP_LABEL_OFFSET=2.5p - gmt grd2cpt ${data} -R${range} -C${color} -Z -D > $cptfile + gmt grd2cpt ${data} -R${range} -C${color} -Z -D -M > $cptfile if [[ $plotgrad == 1 ]]; then gradfile=usergradient.nc gmt grdgradient ${data} -G${gradfile} -Nt -A0/45 - gmt grdimage ${data} -R${range} -C${cptfile} -I${gradfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JL${plot_para[0]}/${plot_para[1]}/${plot_para[2]}/${plot_para[3]}/3i -K -P > $psfile + gmt grdimage ${data} -R${range} -C${cptfile} -I${gradfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JL${plot_para[0]}/${plot_para[1]}/${plot_para[2]}/${plot_para[3]}/2.5i -K -P > $psfile else - gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JL${plot_para[0]}/${plot_para[1]}/${plot_para[2]}/${plot_para[3]}/3i -K -P > $psfile + gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JL${plot_para[0]}/${plot_para[1]}/${plot_para[2]}/${plot_para[3]}/2.5i -K -P > $psfile fi #-C${cptfile}+Uk 使用km(色标单位除1000) - gmt psscale -Dx0.5i/-0.3i+w2i/0.07i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile - gmt psconvert $psfile -A -TeG -E300 + gmt psscale -Dx0.3i/-0.3i+w1.85i/0.08i+h -C${cptfile} -Bxa -By+l${unit} -O >> $psfile + gmt psconvert $psfile -A -TEG -E300 # 删除临时文件 使用linux终端rm命令 rm $cptfile $psfile gmt.history gmt.conf if [[ $plotgrad == 1 ]]; then diff --git a/xy_dot.sh b/xy_dot.sh old mode 100644 new mode 100755 index 86ff4f3..994c426 --- a/xy_dot.sh +++ b/xy_dot.sh @@ -72,9 +72,9 @@ else MAP_LABEL_OFFSET=4p gmt makecpt -C${color} -T${valuerange} > $cptfile - gmt psxy ${data} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JX5i/2.5i -R${range} -C${cptfile} -Sc0.05c -Gblack -P -K -Y6i > $psfile + gmt psxy ${data} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JX5i -R${range} -C${cptfile} -Sc0.05c -Gblack -P -K -Y6i > $psfile gmt psscale -Dx0.5i/-0.6i+w4i/0.15i+h -C${cptfile} -Bxag -By+l${unit} -O >> $psfile - gmt psconvert $psfile -A -TeG -E300 + gmt psconvert $psfile -A -TEG -E300 # 删除临时文件 使用linux终端rm命令 rm $cptfile $psfile gmt.history gmt.conf # 在终端显示图像 此命令需要imgcat.sh脚本和iTerm终端 diff --git a/xy_grid.sh b/xy_grid.sh old mode 100644 new mode 100755 index 6dc96cd..e27ac4d --- a/xy_grid.sh +++ b/xy_grid.sh @@ -79,7 +79,7 @@ else gmt grdimage ${data} -R${range} -C${cptfile} -Bxag+l"${labels[0]}" -Byag+l"${labels[1]}" -JX3i -K -P > $psfile fi gmt psscale -Dx3.2i/0.3i+w2.2i/0.1i -C${cptfile} -Bxa -By+l${unit} -O >> $psfile - gmt psconvert $psfile -A -TeG -E300 + gmt psconvert $psfile -A -TEG -E300 # 删除临时文件 使用linux终端rm命令 rm $cptfile $psfile gmt.history gmt.conf if [[ $plotgrad == 1 ]]; then