Curtis,

I have added support for the extent kwarg in the case with origin=None--that is, the case in which contour is being used alone, not superimposed on an image.

The intention is that extent = (x0,x1,y0,y1) with origin = None will make (x0,y0) the coordinates of Z[0,0] and (x1,y1) the coordinates of Z[-1,-1]. In other words, it provides an easy way to generate equally-spaced coordinates specified by the end points, and corresponding in a simple and unambiguous way to the Z array. Beyond that, the orientation of the axes is determined in the usual way. This seems logical to me.

Curtis Cooper wrote:

But it does. The X and Y arrays give the coordinates of the Z points.

If you want to reverse the Y axis, say to have Y increase downward, then

you do something like this:

a = gca()

a.set_ylim(a.get_ylim()[::-1])

There are many other ways to do it, but the point is that the axes are

drawn with the first ylim value at the bottom and the second at the top,

so to reverse the axis you simply reverse the order of the y limits.

Similarly for the x-axis.

Fair enough, but notice that if I use imshow(Z, extent=[xmin, xmax,

ymax, min]), it displays the image with the ymax extent at the bottom and

ymin at the top of the y-axis, as I intended. For contour, the extent is

always displayed in increasing order in each axis.

With respect to the comparison to imshow: is there any circumstance under which the plotting the same data with the same origin and extent options on the same axes (as in contour_image.py) results in a mis-registration--any sort of mismatch between the image view and the contour view?

I still can't find anything wrong; but if you send me a script that illustrates incorrect behavior, I will certainly look at it.

Thanks.

Eric