Re: Weird Map Projection [message #49897] |
Wed, 30 August 2006 13:12  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Kenneth Bowman writes:
> In the example, there are no labels for 90 and 270, so it is not possible to
> tell whether longitude actually decreases to the right or whether it is just
> labeled in a "creative" way. (That is, the longitudes could be 360, 90, 180,
> 270, 0 or 360, 270, 180, 90, 0.)
>
> If you really need longitude to decrease to the right, assuming the data array
> and associate longitudes vary like this
>
> IDL> x = 360 - 90*lindgen(5)
> IDL> print, x
> 360 270 180 90 0
>
> Just flip the coordinates (not the data) like this
>
> IDL> x1 = -x + 360
> IDL> print, x1
> 0 90 180 270 360
>
> and use a conventional MAP_SET. Then
>
> CONTOUR, z, x1, y, ...
>
> and label "manually"
>
> FOR i = 0, 360, 90 DO YXOUTS, x1[i], y0, STRTRIM(x[i], 2)
>
>
> If your data has longitude *increasing* to the right, but you want to plot it
> backwards, flip the
Well, shoot, that's what I thought. I just assumed it
was wrong. :-)
Thanks,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui.
(Opata Indian saying, meaning "Perhaps thou speakest truth.")
|
|
|