Description
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|
FM_ISC_exampleplot.txt
I reported that issue on the GMT community forum
[Pygmt psmeca beachball - no offset despite following tips from previous post]
Full code that generated the error
import pygmt
import pandas as pd
FM_ISCex=pd.read_csv("FM_ISC_exampleplot.txt",delimiter="\t")
fig = pygmt.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()
Full error message
No error message, but offset given as plot_longitude and plot_latitude is not used during plotting.
System information
Please paste the output of python -c "import pygmt; pygmt.show_versions()"
:
pygmt installed in Anaconda Navigator, seems to be version 0.3.1