Hello, I was wondering whether there is a way to rotate a grayscale/ colorscale when using imshow.
I have been using PGPLOT (a fortran/c plotting library) for many years now, and the equivalent to imshow is called PGGRAY (or PGIMAG). One of the arguments this function takes is a 6-element array TR which is a transformation matrix. From the PGPLOT documentation: "The transformation matrix TR is used to calculate the world coordinates of the center of the "cell" that represents each array element. The world coordinates of the center of the cell corresponding to array element A(I,J) are given by: X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J" This is actually the same as the ImageMatrix element in the Postscript language: "ImageMatrix array (Required) An array of six numbers defining a transformation from user space to image space." (http://www.adobe.com/devnet/postscript/pdfs/PLRM.pdf , page 298) This allows arbitrary rotation/translation of the image to plotting without any loss in quality for vector graphics formats (EPS, PDF, SVG). So far, I have found that imshow has an 'extend' keyword, which is the equivalent of four of the matrix elements, but there is no way to specify the rotation. Is there such a feature in matplotlib already? If not, would it be possible to implement it? Just to be clear, I am not talking about rotating with some kind of interpolation, which would degrade the image (this can be done with PIL). What I want is to be able to specify a transformation matrix which includes rotation, which means that there is no resampling done if I save my plot in a vector graphics format. Thanks in advance for any help! Thomas ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users