Hiccups when plotting focal mechanisms in GMT.jl

While converting a meca test into a GMT.jl example I stumbled with this error. Focal mechanisms are not offset when passing a dataset.

If I have a file with this mechanism

# lon   lat     dep mrr  mtt   mff  mrt  mrf   mtf  exp plon  plat text
239.384 34.556   33 -.27 -2.13 2.40 -.07 -1.32 -.79 24  240.0 35	tensor

and plot it from the file, things work as expected

meca("m1.dat", region=(238.5,242,32.5,35.5), proj=:Mercator, moment_tensor=(scale=(1,"12pu"),), nodal=0, fill=:red, offset="0.5pP5p", title="psmeca", xshift=5, yshift=13, Vd=1, show=1)
        psmeca m1.dat  -R238.5/242/32.5/35.5 -JM14c -Baf -BWSen+tpsmeca -X5 -Y13 -A0.5pP5p -T0 -Gred -Sm1/12pu -P -K > C:\TEMP\GMTjl_tmp.ps

but if I read the data first and pass in the in-memory data then offsetting the beach-ball doesn’t work.

julia> D = gmtread("m1.dat")
Comment:        ["lon   lat     dep mrr  mtt   mff  mrt  mrf   mtf  exp plon  plat text"]
BoundingBox: [239.384, 239.384, 34.556, 34.556, 33.0, 33.0, -0.27, -0.27, -2.13, -2.13, 2.4, 2.4, -0.07, -0.07, -1.32, -1.32, -0.79, -0.79, 24.0, 24.0, 240.0, 240.0, 35.0, 35.0]
1×12 GMTdataset{Float64, 2}
 Row │ lon      lat      dep      mrr      mtt      mff      mrt      mrf      mtf      exp      plon     plat     Text
     │ Float64  Float64  Float64  Float64  Float64  Float64  Float64  Float64  Float64  Float64  Float64  Float64  String
─────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ 239.384   34.556     33.0    -0.27    -2.13      2.4    -0.07    -1.32    -0.79     24.0    240.0     35.0  tensor
meca(D, region=(238.5,242,32.5,35.5), proj=:Mercator, moment_tensor=(scale=(1,"12pu"),), nodal=0, fill=:red, offset="0.5pP5p", title="psmeca", xshift=5, yshift=13, Vd=1, show=1)
        psmeca  -R238.5/242/32.5/35.5 -JM14c -Baf -BWSen+tpsmeca -X5 -Y13 -A0.5pP5p -T0 -Gred -Sm1/12pu -P -K > C:\TEMP\GMTjl_tmp.ps

But note that the Text is correctly printed so wtf the offsetting is ignored.
@seisman can you please try if PyG works fine or shows the same behavior?

What’s up with the -A0.5P5p ? GMT4? It is -A[+ppen][+ssize], no?

See how psmeca.c reads and gets those coordinates and label. I think there is some old GMT4 stuff going on here and that is why: The coordinates seems to be scanned from trailing text. Not sure why. Seems the problem is in meca: When -A is used we should expect 2 more numerical columns.

Probably. There’s not rare that tests have old syntax, which is good for a … test.
Improvements wait to when it’s working.

Fixed in https://github.com/GenericMappingTools/gmt/pull/6835