Colorbar requires mappable?

Hi,

In working on creating updating pcolor plots, I noticed that I can't create colorbars (which should be static) without first displaying an image. I have a fixed Normalize object and colormap, so I would think that the colorbar wouldn't actually need any information from the image itself.

Is there any to create a colorbar without first actually plotting an image? If not, is there any reason colorbar couldn't be modified to work using only a norm and a cmap?

Thanks,

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Ryan,

See examples/colorbar_only.py. I think it illustrates what you want.

Eric

Ryan May wrote:

···

Hi,

In working on creating updating pcolor plots, I noticed that I can't create colorbars (which should be static) without first displaying an image. I have a fixed Normalize object and colormap, so I would think that the colorbar wouldn't actually need any information from the image itself.

Is there any to create a colorbar without first actually plotting an image? If not, is there any reason colorbar couldn't be modified to work using only a norm and a cmap?

Thanks,

Ryan