[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rotating contour lots




ahw199@soton.ac.uk (Ann Webber) writes:

> I am trying to rotate a set of contours about 10 degrees, I understand
> that I have to use the ROT command but I can't seem to get this to
> work. All it seems to do is rotate the plot  about 90 degrees and
> squash the contours. Does anyone have any idea what I am doing wrong?

Having little information, here are some ideas:

 * you should either rotate the image beforehand, or the contours
   afterward. ROT is for images; why are you using it on the contours?

 * ROT does have an ANGLE parameter which can be set to any angle, not
   just 90 degrees (were you really talking about the ROTATE
   function?)  Again, this is for images, not contours.

 * It may be easier to rotate the contours afterwards.  You would
   extract the contours using the PATH_INFO and PATH_XY keywords to
   the CONTOUR procedure, and then apply a simple rotation
   transformation like:
     c = cos(theta) & s = sin(theta)
     xp =  x*c + y*s
     yp = -x*s + y*c

Good luck,
Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------