def plotSlice(self, v, vType='CC',
                  normal='Z', ind=None, grid=False, view='real',
                  ax=None, clim=None, showIt=False,
                  pcolorOpts={},
                  streamOpts={'color':'k'},
                  gridOpts={'color':'k', 'alpha':0.5}
                  ):
        if type(vType) in [list, tuple]:
            assert ax is None, "cannot specify an axis to plot on with this function."
            fig, axs = plt.subplots(1,len(vType))
            out = []
            for vTypeI, ax in zip(vType, axs):
                out += [self.plotSlice(v,vType=vTypeI, normal=normal, ind=ind, grid=grid, view=view, ax=ax, clim=clim, showIt=False, pcolorOpts=pcolorOpts, streamOpts=streamOpts, gridOpts=gridOpts)]
            return out
        viewOpts = ['real','imag','abs','vec']
        normalOpts = ['X', 'Y', 'Z']
        vTypeOpts = ['CC', 'CCv','F','E','Fx','Fy','Fz','E','Ex','Ey','Ez']

        # Some user error checking
        assert vType in vTypeOpts, "vType must be in ['%s']" % "','".join(vTypeOpts)
        assert self.dim == 3, 'Must be a 3D mesh. Use plotImage.'
        assert view in viewOpts, "view must be in ['%s']" % "','".join(viewOpts)
        assert normal in normalOpts, "normal must be in ['%s']" % "','".join(normalOpts)
        assert type(grid) is bool, 'grid must be a boolean'

        szSliceDim = getattr(self, 'nC'+normal.lower()) #: Size of the sliced dimension
        if ind is None: ind = int(szSliceDim/2)
        assert type(ind) in [int, long], 'ind must be an integer'

        assert not (v.dtype == complex and view == 'vec'), 'Can not plot a complex vector.'
        # The slicing and plotting code!!

        def getIndSlice(v):
            if   normal == 'X': v = v[ind,:,:]
            elif normal == 'Y': v = v[:,ind,:]
            elif normal == 'Z': v = v[:,:,ind]
            return v

        def doSlice(v):
            if vType == 'CC':
                return getIndSlice(self.r(v,'CC','CC','M'))
            elif vType == 'CCv':
                assert view == 'vec', 'Other types for CCv not supported'
            else:
                # Now just deal with 'F' and 'E' (x,y,z, maybe...)
                aveOp = 'ave' + vType + ('2CCV' if view == 'vec' else '2CC')
                Av = getattr(self,aveOp)
                if v.size == Av.shape[1]:
                    v = Av * v
                else:
                    v = self.r(v,vType[0],vType) # get specific component
                    v = Av * v
                # we should now be averaged to cell centers (might be a vector)
            v = self.r(v.reshape((self.nC,-1),order='F'),'CC','CC','M')
            if view == 'vec':
                outSlice = []
                if 'X' not in normal: outSlice.append(getIndSlice(v[0]))
                if 'Y' not in normal: outSlice.append(getIndSlice(v[1]))
                if 'Z' not in normal: outSlice.append(getIndSlice(v[2]))
                return np.r_[mkvc(outSlice[0]), mkvc(outSlice[1])]
            else:
                return getIndSlice(self.r(v,'CC','CC','M'))

        h2d = []
        x2d = []
        if 'X' not in normal:
            h2d.append(self.hx)
            x2d.append(self.x0[0])
        if 'Y' not in normal:
            h2d.append(self.hy)
            x2d.append(self.x0[1])
        if 'Z' not in normal:
            h2d.append(self.hz)
            x2d.append(self.x0[2])
        tM = self.__class__(h2d, x2d) #: Temp Mesh
        v2d = doSlice(v)


        if ax is None:
            fig = plt.figure()
            ax = plt.subplot(111)
        else:
            assert isinstance(ax, matplotlib.axes.Axes), "ax must be an matplotlib.axes.Axes"
            fig = ax.figure

        out = tM._plotImage2D(v2d, vType=('CCv' if view == 'vec' else 'CC'), grid=grid, view=view,
                        ax=ax, clim=clim, showIt=showIt,
                        pcolorOpts=pcolorOpts, streamOpts=streamOpts,
                        gridOpts=gridOpts)


        ax.set_xlabel('y' if normal == 'X' else 'x')
        ax.set_ylabel('y' if normal == 'Z' else 'z')
        ax.set_title('Slice %d' % ind)
        return out
The core of your laika module. This is how your code will be invoked
dataset/ETHPy150Open simpeg/simpeg/SimPEG/Mesh/View.py/TensorView.plotSlice--crossover with--dataset/ETHPy150Open lmco/laikaboss/laikaboss/modules/explode_upx.py/EXPLODE_UPX._run