## Re: [Matplotlib-users] World coordinates on image axes

 Re: [Matplotlib-users] World coordinates on image axes From: John Hunter - 2008-06-19 19:02:56 ```On Thu, Jun 19, 2008 at 12:26 PM, Cormac Purcell 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. I believe you are looking for the "extent" argument to imshow, which will handle a linear scaling and offset. JDH ```

 [Matplotlib-users] World coordinates on image axes From: Cormac Purcell - 2008-06-19 18:08:45 ```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 ```
 Re: [Matplotlib-users] World coordinates on image axes From: John Hunter - 2008-06-19 19:02:56 ```On Thu, Jun 19, 2008 at 12:26 PM, Cormac Purcell 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. I believe you are looking for the "extent" argument to imshow, which will handle a linear scaling and offset. JDH ```