removing a colorbar

hi,

how can I remove a colorbar?

in the following code, i generate figures that are saved not shown. and with every new figure I get an extra colorbar instead of an updated one!

from matplotlib.pylab import *

from RandomArray import *

imshow(normal(0,1,(256,256)))

title(‘distance matrix’)

colorbar()

savefig(‘dm.png’)

imshow(normal(0,1,(256,256))+20)

title(‘conectivity matrix’)

colorbar()

savefig(‘cm.png’)

there should be a way to toggle a color bar on and off.

Flávio