I've come across an apparent bug in imshow when outputting to PDF and EPS files. (I haven't tested other vector formats.) It manifests as a small scaling error between the raster image and the axes coordinates.
I have attached a test script to illustrate the problem. The (correct) PNG output file shows a green 'X' at the common point between four pixels near the center of the raster image. The extent is chosen such that the coordinates refer to pixel centers. The PDF and EPS output files show a misalignment between the X and the pixel boundaries -- zoom in to see it clearly. Also, the topmost row and rightmost column appear truncated.
I am using svn r7395.
Thanks for the attention,
test_image_offset.py (601 Bytes)