Hi there,
I have some trouble using subplot within the movie module …
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Main.sh #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
gmt begin
gmt grdfilter \${region} \${data}"?u[\${MOVIE_COL0}]" -Fm5 -D4 -I5 -Gtmp_u.nc
gmt grdfilter \${region} \${data}"?v[\${MOVIE_COL0}]" -Fm5 -D4 -I5 -Gtmp_v.nc
gmt subplot begin 2x2 -M2c -Fs15c \${region} \${projection} -T"\${titre}" -Bwesnlbtr
# TL
gmt grdimage -Ca.cpt \${data}"?a[\${MOVIE_COL0}]" -c0,0
# TR
gmt grdimage -Cb.cpt \${data}"?b[\${MOVIE_COL0}]" -c0,1
# BL
gmt grdimage -Cc.cpt \${data}"?c[\${MOVIE_COL0}]" -c1,0
# BR
gmt grdimage -Cd.cpt \${data}"?d[\${MOVIE_COL0}]" -c1,1
gmt grdvector tmp_u.nc tmp_v.nc -W\${v_pen}c,black -Gblack -Si\${v_scale}k -Q\${v_head}c+e+a45+jc+n\$(echo "scale=3; \${v_scale} * 25;"|bc)k
gmt subplot end
gmt end
EOF
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Post.sh #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
cat << EOF > post.sh
gmt begin
gmt subplot begin 2x2 -M2c -Fs15c \${region} \${projection} -A -Bwesnlbtr
# TL
gmt coast -Dc -Wthin -c0,0
gmt colorbar -Ca.cpt \${clr_sty} \${clr_atxt}
# TR
gmt coast -Dc -Wthin -c0,1
gmt colorbar -Cb.cpt \${clr_sty} \${clr_btxt}
# BR
gmt coast -Dc -Wthin -c1,0
gmt colorbar -Cc.cpt \${clr_sty} \${clr_ctxt}
# BL
gmt coast -Dc -Wthin -c1,1
gmt colorbar -Cd.cpt \${clr_sty} \${clr_dtxt}
gmt legend -DjTR+w2c+o-5p/1p -F+r4p+pthinnest,gray+gwhite --FONT_ANNOT_PRIMARY=8p <<- END
S - - \$(echo "scale=3; 25 * \${v_scale}/111.132954 * \${map_cm}/(\${lonE}-\${lonW});"|bc)c black \${v_pen}c - 25m.s@+-1@+
END
gmt subplot end
gmt end
EOF
This already plot two frames (one is simple, the other is fancy) on top of each other, and they are not perfectly aligned …
If I want to add a title to each subplot by adding -B+t"a title"
in post.sh
, this shift is even more apparent.
If I use some annotation say, -Bx30f10 -By10f10
instead of -Bwesnltrb
in post.sh
, of course they overlap.
Am I missing something ?