Hello All, i'm tring to write python code to display images from a directory .. but i'm not able to learn how to use the matplotlib events to handle how the images will be displaied.
simpli i need to pass to the code the path to directory where i have several tiff files and disply them one at time using a key event. to display a single image i'm using somethin like : #!/usr/bin/env python from pylab import * try: import Image except ImportError, exc: raise SystemExit("PIL must be installed to run this example") import glob def dispimg(input): image = Image.open(input) im = imshow(image, origin='lower') show() ########### i tried to define a key action like : def onpress(event): if event.key=='a': fig.canvas.draw() # and set my directory with : fig = figure() fig.canvas.mpl_connect('key_press_event', onpress) TIFFS = glob.glob("/home/habcam/habcamdata/20100820_1840/*.tif") print "num TIFFS %d" % len(TIFFS) ############## but i'm not able to learn how to plot them and update the displayed image using the key bindings : for tif in TIFFS: print tif show() thanks a lot for Any help! Massimo. ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users