def plot_okada(self, axes=None, dim=1, displacement='vertical', kwargs={}):
if (self.dtopo is None):
raise ValueError("Need to call create_dtopography before plot_okada")
if (displacement is 'vertical'):
if axes is None:
from pylab import figure, subplot
figure()
axes = subplot(111)
if (dim is 1):
axes.plot(self.dtopo.x*LAT2METER,self.dtopo.dZ[0,0,:],**kwargs)
elif (dim is 2):
X,Y = numpy.meshgrid(self.dtopo.x,self.dtopo.y)
axes.pcolormesh(X*LAT2METER,Y*LAT2METER,self.dtopo.dZ[0,:,:],**kwargs)
elif (displacement is 'horizontal'):
if axes is None:
from pylab import figure, subplot
figure()
axes = subplot(111)
if (dim is 1):
axes.plot(self.dtopo.x*LAT2METER,self.dtopo.dY[0,0,:],**kwargs)
dtopotools_horiz_okada_and_1d.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录