From 22cfc6181c75213569f2bd4b66326574c1590d93 Mon Sep 17 00:00:00 2001 From: Lars Ruthotto Date: Mon, 22 Jul 2013 16:20:02 -0700 Subject: [PATCH] fixed bug in plotImage --- SimPEG/TensorView.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SimPEG/TensorView.py b/SimPEG/TensorView.py index 29622c9b..c6f86a8e 100644 --- a/SimPEG/TensorView.py +++ b/SimPEG/TensorView.py @@ -124,6 +124,7 @@ class TensorView(object): # determine number oE slices in x and y dimension nX = np.ceil(np.sqrt(self.nCz)) nY = np.ceil(self.nCz/nX) + # allocate space for montage C = np.zeros((nX*self.nCx,nY*self.nCz)) @@ -143,8 +144,8 @@ class TensorView(object): yy = np.r_[0, np.cumsum(np.kron(np.ones((nY, 1)), self.hy).ravel())] ph = ax.pcolormesh(xx, yy, C.T) # Plot the lines - gx = np.r_[0, np.cumsum(np.kron(np.ones((nX, 1)), np.sum(self.hy)).ravel())] - gy = np.r_[0, np.cumsum(np.kron(np.ones((nY, 1)), np.sum(self.hx)).ravel())] + gx = np.arange(nX+1)*self.vectorNx[-1] + gy = np.arange(nY+1)*self.vectorNy[-1] # Repeat and seperate with NaN gxX = np.c_[gx, gx, gx+np.nan].ravel() gxY = np.kron(np.ones((nX+1, 1)), np.array([0, sum(self.hy)*nY, np.nan])).ravel()