gmt icon indicating copy to clipboard operation
gmt copied to clipboard

Problem clipping with -E*dcw*+c

Open gd-a opened this issue 1 year ago • 6 comments

This works :

gmt begin test png
gmt coast -EFR+c -JL2/46/45/48/5c
gmt coast -Ggray -Swhite -Wfaint -N1 -A10000
gmt coast -Bafg -Q
gmt end show

This doesn't :

gmt begin test png
gmt coast -Rg -JG0/45/15c -Dc -Wfaint -Glightgray -Bafg
gmt coast -EFR+c -JL2/46/45/48/5c
gmt coast -Ggray -Swhite -Wfaint -N1 -A10000
gmt coast -Bafg -Q
gmt end show

gd-a avatar Feb 23 '24 15:02 gd-a

Can you please make this a one-liner? Modern mode scripts are quite hard to debug.

joa-quim avatar Feb 23 '24 18:02 joa-quim

I’m not sure I can use the clip fonction (-E+c) in one-liner though ?

gd-a avatar Feb 24 '24 19:02 gd-a

Yep, probably not. But the idea is to have the minimum set of commands that reproduce the issue. And in this regard modern mode does not help either. Modern mode scripts are a hell do debug.

joa-quim avatar Feb 24 '24 19:02 joa-quim

I can only imagine… but clipping is specific to modern mode as I understand it, correct ?

gd-a avatar Feb 24 '24 20:02 gd-a

Nope. subplots, insets and maybe a few other are modern mode only. Large majority is dual mode. Clipping in this case comes from (ps)coast.

joa-quim avatar Feb 24 '24 20:02 joa-quim

Well, here's the classic version (not working either) :

gmt pscoast -Rg -JG0/45/15c -Dc -Wfaint -Glightgray -Bafg -K > test.ps
gmt pscoast -EFR+c -JL2/46/45/48/5c -X2.5c -Y2.5c -K -O >> test.ps
gmt pscoast -EFR -JL2/46/45/48/5c -Gdarkbrown -Wfaint -N1 -A10000 -K -O  >> test.ps
gmt pscoast -Q -O >> test.ps

gd-a avatar Feb 26 '24 14:02 gd-a