Dear Obspy Forum.
I have been working with beachball plots and I wanted to plot them over a map for my region.
I followed the steps posted on the example under the web page, unfortunately I am not getting the beachball plotted. However I can plot the epicenters, I use a basemap from ArcGisdatabase (World_Physical_Map).
This is the code:
##this part is for plotting Latitude, Longitude…from a csv file
ax = plt.gca()
min_marker_size = 1.9
for lon, lat, mag, in zip(lons, lats, magni):
x,y = m(lon, lat)
msize = mag * min_marker_size
#eq_map.plot(x, y, ‘b*’, markersize=msize)
m.plot(x, y, ‘r+’, markersize=msize)
i create a list for focal mechanism solutions frmo a csv file
lati,longi =m(lats,lons)
foca=[]
for u in range(len(strike)):
foca.append([strike[u],dip[u],rake[u]])
Trying to plot the beachballs
for k in range(len(foca)):
b=beach(foca[k],xy=(lati[k],longi[k]),facecolor=‘blue’, width=500, linewidth=1,alpha=0.85)
b.set_zorder(10)
ax.add_collection(b)
title_string = “Focal Mechanism Bolivia\n”
plt.title(title_string)
plt.show()
I tried to modify the width and set_order() but i could not get any positive result.
Would you mid give a hand, please?
Thank you in advance.
Tonino