2010/2/27 David Goldsmith <d_l_goldsm...@yahoo.com>: > ax.imshow(image[0:ny/2+1, 0:nx/2+1]) # upper left corner of image > ax.imshow(argW[ny/2+1:-1, 0:nx/2+1]) # lower left corner of image > ax.imshow(argW[0:ny/2+1, nx/2+1:-1]) # upper right corner of image > ax.imshow(argW[ny/2+1:-1, nx/2+1:-1]) # lower right corner of image
Some tiny improvement: ax.imshow(argW[:ny/2+1, :nx/2+1]) ax.imshow(argW[ny/2+1:, :nx/2+1]) ax.imshow(argW[:ny/2+1, nx/2+1:]) ax.imshow(argW[ny/2+1:, nx/2+1:]) The main advantage is that you do not cut off the last pixel row/column by indicing [:-1], which will run until the last index *before* the index -1. >>> a = numpy.asarray([1, 2, 3]) >>> a[:-1] array([1, 2]) Friedrich ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users