|
From: Eric F. <ef...@ha...> - 2007-01-02 20:02:25
|
John Hunter wrote: >>>>>> "Petr" == Petr Danecek <da...@uc...> writes: [...] > Petr> 2) When set_aspect() is used, the size of colorbar does not > Petr> respect y-dimension of the graph. (See the attached > Petr> example.) Is it possible to set the size of the colorbar > Petr> directly? Examples of the shrink kwarg are examples/image_masked.py and examples/contour_demo.py. As an alternative to using the shrink kwarg you can always specify axes positions manually. One example is in examples/multi_image.py. Attached is another example modified from image_masked.py. > > One of the examples shows how to do this if I recall correctly, but I > don't remember which one. Eric Firing wrote it so I'm sure he'll be > along shortly to point you to the light. Eric -- perhaps we should > also add a snippet to the colorbar docstring since this is a common > request. I have added a bit to the docstring to emphasize the function of the shrink kwarg. This will usually be the easiest manual solution to the problem. I have also thought a bit about adding functionality to the axes.draw() method that would allow the colorbar height to track the height of the mappable axes object; maybe I will try it later. Eric |