Open gd-a opened 2 years ago
... nevermind ... sorry
Ok ... I've retried ... it does conserve -X -Y but neither -R or -J
gmt inset begin -DjBR+w3.5c+o0.25c/0.25c
gmt coast -Rg -JG0/0/3c+w45 -Dc -Ggray -A5000 -Bg -Wfaint -X0.25 -Y0.25
gmt plot <<- EOF
> delta-line -Wthin,black -Am
0 -89
0 89
EOF
gmt inset end
It should retain -R -J once set inside the inset box. Could you help by supplying a full test script?
gmt begin test png
gmt basemap -R0/1/0/1 -JX10c -B
gmt inset begin -DjBR+w3.5c+o0.25c/0.25c
gmt coast -Rg -JG0/0/3c+w45 -Dc -Ggray -A5000 -Bg -Wfaint -X0.25 -Y0.25
gmt plot <<- EOF
> delta-line -Wthin,black -Am
0 -89
0 89
EOF
gmt inset end
gmt end show
If I interpret correctly the black line placement, it seems that -JG0/0/3c is not respected (it takes 3.5c)
I think for gmt inset you have to stick with the rules for the inset:
A successful script based on what you have above does not use -X -Y at all and looks like this:
gmt begin test png
gmt basemap -R0/1/0/1 -JX10c -B
gmt inset begin -DjBR+w3.5c+o0.25c/0.25c -F+pfaint -M0.25c
gmt coast -Rg -JG0/0/?+w45 -Dc -Ggray -A5000 -Bg -Wfaint
gmt plot <<- EOF
> delta-line -Wthin,black -Am
0 -89
0 89
EOF
gmt inset end
gmt end show
Yet there are clearly documentation issues here, so I am not quite sure what is the best way forward here. Here are a bunch of concerns or issues.
-JG0/0/+w45
) but that is not tolerant (yet) of the trailing modifier. So for this projection, ? works, for other projections without a modifier you can leave it off. Not consistent.My proposal is this:
echo 0 0 | gmt plot -SE-200k -Gred
makes this clear). If it is not possible (or too hard for now) then we should reject the use of -X -Y inside insets.So I would have to use something else than inset
in my case.
The red arrow in here can not, to the best of my knowledge, be plotted outside the geographic boundaries without -X, -Y (and eventually the projection change)
I am not completely done with this issue yet, but the intent is that you should be able to use -X -Y on commands inside your inset begin/end clause, but not with inset itself. There may be issues related to this as well but that is for the next steps. The key issue here is that gmt inset itself was never meant to take -X -Y.
There's an issue with ex44.sh after the recent inset changes. It's odd because the script does not use -X or -Y, but here are the error messages:
bash ex44.sh
inset [ERROR]: Unrecognized option -X
inset [ERROR]: Unrecognized option -Y
inset [ERROR]: Unrecognized option -X
inset [ERROR]: Unrecognized option -Y
inset [ERROR]: Unrecognized option -X
inset [ERROR]: Unrecognized option -Y
inset [ERROR]: Unrecognized option -X
inset [ERROR]: Unrecognized option -Y
Thanks, I will look at it later today or the weekend (busy day for other matters)
Thanks @PaulWessel, good luck ! (in the meantime I've bodged my code to circumvent the issue)
Not sure it is a bug but it seems that
inset
doesn't retain history within its block. Is it on purpose ?Guillaume