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'
lay_num=0
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
case $arg in
h)
@ -94,6 +95,7 @@ do
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 \
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 "-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."
@ -139,6 +141,8 @@ do
annotation=$OPTARG;;
p)
polyfile=$OPTARG;;
P)
close_poly='';;
K)
keep_open=1;;
O)
@ -246,7 +250,7 @@ else
# 画多边形
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
#添加号码