def plotter(z, x, y, pixelaspect, **kwargs):
    xinches = len(x)/float(dpi)
    yinches = len(y)/float(dpi)*pixelaspect
    figsize = (xinches + 1.5, yinches + 1)
    fig = plt.figure(figsize=figsize)
    ax = plt.subplot(111)
    el.make_axes_fixed(ax, xinches, yinches)
    img = el.implot(z, x, y, ax=ax, csize=0.0625, cpad=0.05, **kwargs)
    plt.tight_layout(0.01)
    return fig
def plotter(z, t, r, **kwargs):
    xinches = len(t)/float(dpi)*pixelaspect
    yinches = len(r)/float(dpi)
    figsize = (xinches + 1.5, yinches + 1)
    fig = plt.figure(figsize=figsize)
    ax = plt.subplot(111)
    el.make_axes_fixed(ax, xinches, yinches)
    img = el.rtiplot(z, t, r, ax=ax, csize=0.0625, cpad=0.05, **kwargs)
    plt.tight_layout(0.1)
    return fig
cmap.set_bad(cmap(0))

for kp in xrange(5):
    pslc = slice(kp, None, 5)
    vlt = data.vlt[pslc]
    cs_sig = cs.vlt_sig[pslc]
    cs_noise = cs.vlt_noise[pslc]
    
    filt = filts[kp]

    zs = np.zeros((n, m), np.float_)
    
    xinches = len(v)/float(imgdpi)*xstretch
    yinches = len(data.r)/float(imgdpi)*ystretch
    fig, axes = plt.subplots(1, 2, sharey=True, figsize=(2*xinches + 1, yinches + 0.55))
    el.make_axes_fixed(axes[0], xinches, yinches)
    el.make_axes_fixed(axes[1], xinches, yinches)
    mfimg = el.implot(zs, 
                      np.fft.fftshift(v)/1e3, data.r/1e3,
                      xlabel='Doppler range rate (km/s)', ylabel='Range (km)',
                      cbar=False, title='Matched Filter', 
                      exact_ticks=False, xbins=5,
                      vmin=0, vmax=40, 
                      cmap=cmap, csize=0.0625, cpad=0.05,
                      pixelaspect=pixelaspect, ax=axes[0])
    csimg = el.implot(zs, 
                      np.fft.fftshift(cs.v)/1e3, cs.r/1e3,
                      xlabel='Doppler range rate (km/s)',
                      clabel='SNR (dB)', title='Waveform Inversion',
                      exact_ticks=False, xbins=5,
                      vmin=0, vmax=40,