color normaliztion for an contourf plot

So I have a contourf plot and I am resetting the ylims so as to only display a subset of the full contourf plot. Is there anyway to set norm and the colorbar so they take their colormapping settings using the data currently on display? By which I mean: the full dataset has a range of 260-320. The reset axes limits display a region that only has values between 280-310. I'd like the colormap to extend over this range of values automatically, without having to set vmin=280, vmax=310. Any way to do that?

Jordan

Jordan Dawe wrote:

So I have a contourf plot and I am resetting the ylims so as to only display a subset of the full contourf plot. Is there anyway to set norm and the colorbar so they take their colormapping settings using the data currently on display? By which I mean: the full dataset has a range of 260-320. The reset axes limits display a region that only has values between 280-310. I'd like the colormap to extend over this range of values automatically, without having to set vmin=280, vmax=310. Any way to do that?

Jordan,

I don't think so; and although I have not thought hard about it, my impression is that adding this capability would take a lot of work and redesign. I expect that in most cases what you describe would not be the desired behavior, so it would have to be a non-default option.

Eric