In principle, yes. Depending on how your input data is formatted, depth should be in the third column. However, your data has 9 columns and the filename contains “gCMT”, on the other side you set convention to 'aki'. Is your data in the right format?
@mgrund, about the input file, the data comes from GCMT for that reason I named gCMT.
The input is “sorted” like the AKI format, however the last two columns are offset where I’d like to plot the beach-balls (same as GMT input), however I am not able to plot with offset the beach-balls.
@mgrund, I just updated the version of PyGMT to newest and it’s running smooth the offset for beach-balls, thank you, stay safe and best regards
Tonino
Thank you very much for posting your code for coloring focal mechanisms by depth. I hadn’t updated PyGMT to v0.5.0 but have now done that and this seems to have been the final step required to crack the problem. Like you, I think, I also found I had to write my data frame out as a tab-separated file and then read it in again, instead of passing it directly to meca.
Thanks again and best wishes from Wellington,
John T.
i cant still plotting offset for beachballs???
data input coulmn is lon lat depth strike dip slip mag plot_lon plot_lat with txt format
whats problem
and i installed last version pygmt 7.0
fig.meca(spec=data, convention=“aki”, scale=“0.7c”,plot_longitude=True, plot_latitude=True, offset=True)
raise GMTError(
pygmt.exceptions.GMTError: Parameters in spec dictionary do not match known conventions.
data
0 1 2 3 4 5 6 7 8
0 53.48 36.07 12.2 220.7 52.3 170.4 4.6 53.1 36.2
1 55.09 36.98 16.1 316.6 64.7 -190.1 5.2 55.1 37.2
2 53.01 36.67 25.1 137.6 28.5 91.0 4.7 54.2 35.9
but it doesnt still work.
If possible you give me a csv file that you with it plotted offset and i will try with it.
Sorry, I do not use pyGMT so I do not know if the read_csv command inserts those running numbers 0 1 2 etc or if they are in your data file. Maybe @seisman can suggest something?