I tried to clip the top (z=0) and one side (y=-1) of a 3d plot using the following script:test.txt (548 Bytes)
#!/bin/bash
p=115/25
gmt begin test
gmt plot3d -pz$p/0 -R-2/2/-1/1/0/1 -Jx1c -Jz-1c -Bxa2f1 -Bya1f0.5 -Bza1f0.5 -BeWNsZ -Wthicker,black <<EOF
>
-2 -1 1
2 -1 1
2 -1 0
>
2 -1 1
2 1 1
2 1 0
EOF
gmt clip -pz$p/0 -Jz -Wthin,red <<EOF
-2 -1 0
-2 1 0
2 1 0
2 -1 0
EOF
gmt plot3d -pz$p/0 -Jz -Gskyblue -L <<EOF
-2 0 0
0 2 0
2 0 0
0 -2 0
EOF
gmt clip -C
gmt clip -py$p/-1 -Jz -Wthin,blue <<EOF
-2 -1 0
-2 -1 1
2 -1 1
2 -1 0
EOF
gmt plot3d -py$p/-1 -Jz -Gorange -L <<EOF
-2 -1 0.5
0 -1 1.5
2 -1 0.5
0 -1 -0.5
EOF
gmt clip -C
gmt end
What I get was:test.pdf (5.0 KB)
The clip on the top worked as I expected, but the clip on the side y=-1 didn’t work.
Note that the blue line showing the clip path is in z=1,y=1, it is not what I expected.
If I remove the clip in y=-1, I get:testB.pdf (4.9 KB)
It is as I expected without the clip.
Is there a way to make the clip at y=-1?
(using gmt 6.2.0_2ea7528_2021.01.14)