World coordinates on image axes

Hello,

I need to find a way to apply a offset and scaling factor to the X and Y axes on an image plot. Instead of showing the pixel number I would like to transform the axes to 'world' coordinates, in this case degrees of Right-ascension and Declination in an astronomical image. The transformation is defined on both axes via an offset and a scaling factor.

For example in PGPLOT this can be accomplished by specifying a transformation vector with the call to 'pgimag()'.
http://www.icp.uni-stuttgart.de/~feri/pgplot.html#PGIMAG

Despite looking at the examples in the tar-ball I cannot seem to find similar functionality - likely because I am new to matplotlib.

Can anybody point me in the right direction?

Thanks,

Cormac

I believe you are looking for the "extent" argument to imshow, which
will handle a linear scaling and offset.

JDH

ยทยทยท

On Thu, Jun 19, 2008 at 12:26 PM, Cormac Purcell <Cormac.Purcell@...1203...> wrote:

Hello,

I need to find a way to apply a offset and scaling factor to the X and Y
axes on an image plot. Instead of showing the pixel number I would like
to transform the axes to 'world' coordinates, in this case degrees of
Right-ascension and Declination in an astronomical image. The
transformation is defined on both axes via an offset and a scaling factor.