def plot_pierce_points(self,depth=410.0,ax='None'):
'''
Plots pierce points for a given depth. If an axes object is supplied
as an argument it will use it for the plot. Otherwise, a new axes
object is created.
'''
if ax == 'None':
m = Basemap(llcrnrlon=0.0,llcrnrlat=-35.0,urcrnrlon=120.0,urcrnrlat=35.0)
else:
m = ax
m.drawmapboundary()
m.drawcoastlines()
found_points = False
for i in range(0,len(self.pierce_dict)):
if self.pierce_dict[i]['depth'] == depth:
x,y = m(self.pierce_dict[i]['lon'],self.pierce_dict[i]['lat'])
found_points = True
if found_points == True:
m.scatter(x,y,50,marker='+',color='r')
else:
print "no pierce points found for the given depth"
评论列表
文章目录