if vmin is None:
    vmin = default_vmin
if vmax is None:
    vmax = default_vmax
my_norm = matplotlib.colors.Normalize(vmin, mmax)
kwargs['norm'] = norm
ax.figure.canvas.draw()
return ax.imshow(im, *args, **kwargs)
Matplotlib: using a figure object to initialize a plot