Hello,  
I wish to plot 4 different raster images within a figure, and later
plot registered lines highlighting certain features of them.


Here is the code to read one image and plot it, works as expcted:
img = Image.open(sys.argv[1])
img1 = numpy.asarray(img)
pylab.figure()
pylab.imshow(img1)
pylab.savefig('_imgok.jpg')


Now, make a double-sized image array, and tile the original image into it:
pylab.figure()
YRES = img1.shape[0]
XRES = img1.shape[1]
twoimg = numpy.zeros((2*YRES,2*XRES,3))
#twoimg = numpy.empty((2*YRES,2*XRES,3),numpy.uint32)
twoimg[0:YRES,0:XRES,:] = img1
twoimg[0:YRES,XRES:2*XRES,:] = img1
twoimg[YRES:2*YRES,0:XRES,:] = img1
pylab.imshow(twoimg, origin='upper', interpolation='nearest')
pylab.gray()
pylab.savefig('_imgproblem.jpg')


It comes out strangely colored, vaguely as if the red and green channels were
swapped.  However, that's not it (I tried swapping).


This is with maaplib-0.91 (-2?) on a mac 10.4.11, and I think
the backend is GTKAgg




Thanks for any advice 
(recent convert from matlab, quite happy...)









__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to