Pygmt psmeca beachball - no offset despite following tips from previous post

Hi!

I am trying to plot focal mechanisms on a map with an offset. I’ve tried to follow the tips given here:
[ PyGMT: How to offset focal mechanism beachballs?]
but still cannot get it to work, the two beachballs in the southeast are still plotted on top of each other, although there is no error message.

My file contains the columns
longitude latitude depth strike dip rake magnitude plot_longitude plot_latitude
and columns are separated by tabs:

|longitude|latitude|depth|strike|dip|rake|magnitude|plot_longitude|plot_latitude|
|1.4421|51.2819|15.5|47.28|32.05|112.09|4.5|1.4421|52|
|1.3884|51.3337|17|69.84|25.88|151.52|4.5|0.75|51.3337|
|-0.055|53.648|19.3|21.33|84.92|-19.37|4.1|-0.055|53.648|
|-1.314|54.594|4.6|102.1|84.1|-162|3.1|-1.314|54.594|

My code looks as follows:

Read ISC catalogue for plotting focal mechanisms

FM_ISCex=pd.read_csv(‘FM_ISC_exampleplot.txt’,delimiter="\t")

fig = gmt.Figure()
fig.coast(
region="-2/2/51/55",
projection=“M15c”,
land=“lightgray”,
water=“white”,
borders=“1/0.5p”,
shorelines=“1/0.5p”,
frame=“ag”,
)

fig.meca(
spec=FM_ISCex,
convention=‘aki’,
scale=“2c”,
G=‘red’,
offset=True
)

fig.show()

What am I still doing wrong?
Thanks a lot for any help, very appreciated!

Kind regards,
Daniela

It looks like a bug in PyGMT. Could you please open a bug report in https://github.com/GenericMappingTools/pygmt.

Have done, thanks for the help!

Solution: I upgraded the pygmt version to v0.7.0 and changed the meca command to directly read the file instead of using pandas:

fig.meca(
spec=“FM_ISC_selected_addedmags_plotting.txt”,
convention=‘aki’,
scale=“2c”,
G=‘red’,
offset=True
)

That works (although I probably should offset to a slightly different place

)!

Thanks, @seisman :slight_smile: