On 2/4/07, David Levitan <[EMAIL PROTECTED]> wrote:

> I'm trying to create an application that, among other things, will allow
> me to view an image, zoom into it, and move it around. Essentially what
> I can do by using imshow and show in ipython. However, I've noticed that
> in both interactive usage and my  application the image comes up in a
> small set of axes that do not fill up the screen 100% (the image is
> rectangular). Zooming or dragging the image around then causes part of
> it to go off the axes, which is not desirable.
>
> What I would like to do is increase the size of the area where the image
> can be displayed to the area given to the canvas in my application.
> Then, if I drag the image around, part of it won't disappear. However,
> I'm not really sure how to do this. What is the best way to accomplish
> this goal (preferably for non-interactive usage - I'm using the QT4 back
> end)?

You can set the size of the axes you want using

 ax = fig.add_axes([left, bottom, width, height])

where all numbers are fractions of figure size, eg

 ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])

My guess is what you are experiencing may result from the image aspect
handling.  Try setting the aspect to 'auto' when you create your image

 ax.imshow(X, aspect=' auto')

JDH

-------------------------------------------------------------------------
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