dynamic colorbar

Ok, here's the problem, illlustrated by a simple variant

    > of the dynamic_image_gtkagg.py example (see below). I've
    > put in a colorbar and I'm letting the amplitude of the
    > pattern grow linearly in time. The result is that the
    > colormap limits remained fixed at their initial values
    > (-2,2), rather than change in time. If I don't put in the
    > colorbar, the colormap limits *do* change. I'm a bit
    > confused about all this. I tried changing the
    > normalization of the colormap doing im.autoscale(z) each
    > time z is updated, but that doesn't work ...

OK, I understand the problem now. The reason setting the colorbar
caused the behavior you find unusual (the colormap limits remain
fixed) stems from the call to

    if norm.vmin is None or norm.vmax is None:
        mappable.autoscale()

in matplotlib.matlab.colorbar. When the normalization limits are
None, the normalization class automatically uses the full range. This
call to autoscale sets the normalization limits, and after that they
are fixed.

I'll have to make some changes to the code to do this right, perhaps
creating a colorbar class instance on which you can call various
methods to get the desired behavior. The question is: what is the
right default behavior, and what are the other kinds of behaviors that
should be possible? I imagine that in some cases when you set the
array data for the main window, you want to colorbar and color limits
to update and autoscale it's range, and in other cases you want the
colorbar and limits to autoscale.

JDH