Stefan,

That certainly looks to me like a bug, but it is not obvious to me after 
a quick look where the bug is (although I suspect it is very simple), 
and I can't look at it more right now.  If someone else doesn't chime in 
with a fix, you might want to file a bug report on sourceforge to make 
sure it is not forgotten. Maybe I can take another look within the next 
few days.

What do you mean when you say "the image gets scaled after plotting"?

Eric

Stefan van der Walt wrote:
> Hi all,
> 
> I have a script that reads in mouse-click coordinates from an image.
> I noticed that, with image extents specified, the axes flip whenever I
> plot to them.
> 
> This snippet demonstrates the behaviour I see:
> 
> # -- START --
> 
> import pylab as P
> import numpy as N
> 
> # Generate test pattern
> x = N.arange(100).reshape(-1,1) + N.zeros(100)
> 
> def click(event):
>     print "Mouse click at (%f,%f)" % (event.xdata,event.ydata)
>     P.plot([event.xdata],[event.ydata],'o')
>     P.draw()
> 
> P.imshow(x,extent=(0,x.shape[1],x.shape[0],0))
> P.connect('button_press_event',click)
> P.show()
> 
> # -- END --
> 
> 
> Is this normal? If so, how do I get around the problem?  I also
> noticed that, even without extents, the image gets scaled after
> plotting.
> 
> I'd appreciate any advice!
> 
> Thanks for your time.
> Stéfan
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to