What you see is a design limitation rather than a bug or feature.  One 
easy workaround is to use the shrink kwarg.  See 
examples/contour_demo.py.  Another approach is to create the axes object 
you want for the colorbar manually, as in examples/multi_image.py and 
examples/subplots_adjust.py.

Eric

[EMAIL PROTECTED] wrote:
> Hi,
> 
> I have some problem with this kind of script:
> 
> #!/usr/bin/env python
> import numpy
> import numpy.random
> import pylab
> 
> a = numpy.random.rand(10,10)
> pylab.matshow(a)
> pylab.colorbar()
> 
> pylab.figure(figsize=(4.8,8),dpi=100)
> pylab.imshow(a,aspect='equal',interpolation='nearest')
> pylab.colorbar()
> 
> pylab.show()
> 
> The second figure is not good (at least for my point of view). I was 
> expecting 
> that the colorbar will have the same size than the image, even if aspect is 
> set on equal or a number. Perhaps there are a simple solution for this that I 
> didn't find.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to