def image_set_clim(zmin=None, zmax=None, axes="<STR_LIT>"):
if axes=="<STR_LIT>": axes=_pylab.gca()<EOL>image = axes.images[<NUM_LIT:0>]<EOL>if zmin=='<STR_LIT>': zmin = _n.min(image.get_array())<EOL>if zmax=='<STR_LIT>': zmax = _n.max(image.get_array())<EOL>if zmin==None: zmin = image.get_clim()[<NUM_LIT:0>]<EOL>if zmax==None: zmax = image.get_clim()[<NUM_LIT:1>]<EOL>image.set_clim(zmin, zmax)<EOL>_pylab.draw()<EOL>
This will set the clim (range) of the colorbar.

Setting zmin or zmax to None will not change them.
Setting zmin or zmax to "auto" will auto-scale them to include all the data.