Adam-221 wrote:
> 
> hi, I am trying to use ginput with some images and for some reason it
> keeps
> changing the axes with the mouse click.
> I don't know if this is a feature or bug, but I would like it not to
> affect
> my images at all.
> 
> here is a short example:
> 
> #---
> from pylab import  ginput, imshow, rand
> 
> t=rand(50,50)
> imshow(t)
> x = ginput(1)
> #---
> 
> this problem was also addressed in a post back in august:
> http://www.nabble.com/ginput-changes-axes-limits-td18863282.html#a18863282
> but it received no replies.
> 
> any ideas on whats going on?
> 
> thanks,
> adam.
> 
> 

Hi adam


I found I needed to set the axis type to 'image'. 
The following code dosen't resize.

#------------------------------------------------------
import pylab

x1 = pylab.rand(103, 53)
fig1 = pylab.figure(1)
ax1 = fig1.add_subplot(111)
ax1.imshow(x1)
ax1.axis('image')
ax1.axis('off')
x = fig1.ginput(2)

fig1.show()

#--------------------------

cheers Eleanor
-- 
View this message in context: 
http://www.nabble.com/using-ginput-with-images----axes-are-resized--tp20270943p20349847.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to