Hello, I want to display some data as an image and also as a contour.
I have been looking at imshow and pcolor and find that contour and imshow are behaving differently than pcolor. In the example below I have a 5x5 image. pshow displays the pixels but imshow and contour shows resampling artifacts since they resample offset by 0.5pixels. The advantage of imshow is that the pixels are square which is what I want. I also want to use contour which also seems to show the same type of resampling as imshow. import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt image = np.random.rand(5,5) plt.figure() plt.pcolor(image) plt.title('pcolor defaults') plt.figure() plt.imshow(image, origin='lower') plt.title('imshow defaults with origin=lower') plt.show() Is there a method to force imshow to not resample the image It is not obvius to me from reading the help for imshow and pcolor. Thanks, richard ------------------------------------------------------------------- Dr. Richard G. McMahon | Phone (office) 44-(0)-1223-337519 University of Cambridge | (switchboard) 1223-337548 Institute of Astronomy | (secretary) 1223-337516 Madingley Rd | FAX 1223-337523 Cambridge, CB3 OHA, UK. | mobile 7885-409019 Office: Hoyle 18 | home 1223-359770 ------------------------------------------------------------------- email: r...@ast.cam.ac.uk | WWW: http://www.ast.cam.ac.uk/~rgm richardgmcma...@gmail.com | skype: richardgmcmahon ------------------------------------------------------------------- ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users