No, I don't think the issue is a flip in the y-axis.  I have a number of different examples of this, and many in which the contour is an ellipse so I can tell that the overall positioning is correct.  It seems like something is going wrong only when I save the image...  Thanks for the suggestion though!
Jenna

On Wed, Jul 21, 2010 at 3:40 PM, Jenna Lemonias <jenna@astro.columbia.edu>wrote:

> I am trying to save a matplotlib 2d array image with an overlaid contour as
> an eps file.  The contour appears to be shifted with respect to the image
> underneath in the eps file, particularly when I zoom in on the image.  This
> shift is not noticeable in the plot within matplotlib.
>
> I am using imshow to display the image.  The contour is created by plotting
> a list of closely-spaced x,y coordinates.  The attached file matplotlib.png
> is a screenshot of the (zoomed-in) image as displayed by matplotlib.  The
> attached file epsfile.png is a screenshot of the (zoomed-in) eps file.  When
> I save this image as an eps file, it is actually 1 of 20 subplots and the
> shift is noticeable in each subplot.
>
> Thanks in advance for your help!
>
> Jenna
>
>
Just as a wild guess, could this actually be an issue with how imshow uses
the upper-left corner for (0,0)?  I have seen 1-pixel shifts before, but
this shift is a little dramatic and I am left wondering if what we are
really seeing is that the contour that is desired should actually be fliped
in the y-axis?

Maybe you could try another example where you try to draw a contour further
away from the center of the image and see if it still goes in the spot you
expect it to be?

Ben Root