rotating contour lots [message #25887] |
Thu, 26 July 2001 04:05  |
ahw199
Messages: 6 Registered: July 2001
|
Junior Member |
|
|
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?
|
|
|
Re: rotating contour lots [message #25926 is a reply to message #25887] |
Mon, 30 July 2001 08:51  |
Pavel A. Romashkin
Messages: 531 Registered: November 2000
|
Senior Member |
|
|
Craig Markwardt wrote:
> * 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
I think I am going to set up a newsgroup filter called "Craig", and
redirect everything Craig writes to a folder "Geom_advice", where I will
look every time I plan to use a coordinate transformation. You know, I
studied all this before (I think) and even had an A+. But it is very
hard when you forget something that you actually never really new :-(
Cheers,
Pavel
|
|
|
Re: rotating contour lots [message #25972 is a reply to message #25887] |
Thu, 26 July 2001 10:45  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
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
------------------------------------------------------------ --------------
|
|
|