update gmtxy-image2

This commit is contained in:
张壹 2020-09-06 14:08:49 +08:00
parent c6ef63f76a
commit df0c42a119

View File

@ -53,8 +53,9 @@ bar_origin=("0" "0")
polyfile='null' polyfile='null'
lay_num=0 lay_num=0
run_command=1 run_command=1
close_poly='-L'
# 从命令行获取参数 # 从命令行获取参数
while getopts "hi:o:L:r:u:c:l:G:t:v:f:a:p:X:x:gnKOS" arg while getopts "hi:o:L:r:u:c:l:G:t:v:f:a:p:X:x:gnKOSP" arg
do do
case $arg in case $arg in
h) h)
@ -94,6 +95,7 @@ do
please output a data specified script using the -S option, then edit the script accordingly." please output a data specified script using the -S option, then edit the script accordingly."
dispOptionShort "-p" "Take inputs from a table file and plot polygons. Each line of the file \ dispOptionShort "-p" "Take inputs from a table file and plot polygons. Each line of the file \
represents a 2D point's coordinates." represents a 2D point's coordinates."
dispOptionShort "-P" "Keep the polygon plotted by the -p option open."
dispOptionShort "-K" "Keep the .ps file open. This option must be set for plotting multiple images to a single output file." dispOptionShort "-K" "Keep the .ps file open. This option must be set for plotting multiple images to a single output file."
dispOptionShort "-O" "Continue from a previous .ps file. This option must be set for plotting multiple images to a single output file." dispOptionShort "-O" "Continue from a previous .ps file. This option must be set for plotting multiple images to a single output file."
dispOptionShort "-X" "Move the starting point for mapping the image. Use this option for plotting sub-figures." dispOptionShort "-X" "Move the starting point for mapping the image. Use this option for plotting sub-figures."
@ -139,6 +141,8 @@ do
annotation=$OPTARG;; annotation=$OPTARG;;
p) p)
polyfile=$OPTARG;; polyfile=$OPTARG;;
P)
close_poly='';;
K) K)
keep_open=1;; keep_open=1;;
O) O)
@ -246,7 +250,7 @@ else
# 画多边形 # 画多边形
if [[ $polyfile != 'null' ]]; then if [[ $polyfile != 'null' ]]; then
RunOrEcho ${run_command} "gmt psxy ${polyfile} -JX${layouts[0]}/${pic_height}i -W0.25p,black,- -R${range} -L -K -O >> $psfile" RunOrEcho ${run_command} "gmt psxy ${polyfile} -JX${layouts[0]}/${pic_height}i -W0.25p,black,- -R${range} ${close_poly} -K -O >> $psfile"
fi fi
#添加号码 #添加号码