comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: contour discontinuity
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: contour discontinuity [message #84234 is a reply to message #84213] Fri, 03 May 2013 06:46 Go to previous messageGo to previous message
Kenneth Bowman is currently offline  Kenneth Bowman
Messages: 86
Registered: November 2006
Member
On 2013-05-03 10:35:07 +0000, Sam said:

> Hello,
>
> I have plotted a 2D latitude vs. Longitude contour. When I do it from
> -180 longitude to +180 longitude scale, it is coming perfect. Now I
> want the same plot to be shown in 0 to 360 latitude. But there is a
> white vertical band coming at 180 longitude (in the middle of the plot).
>
> I will be grateful for help.
>
> Thanks.

I suspect that you have the 'white stripe' in both cases, but it is
obvious in the second case because it is in the middle of the plot.

You need to duplicate the first or last 'column' of your data so that
it wraps all the way around the globe. Such as

data = [data, data[0,*]]

You probably also want to convert your longitudes from the [-180, 180]
convention to [0, 360] and add an extra point at the end

lon = (lon + 360.0) MOD 360.0
lon = [lon, 359.999]

You can also avoid some map plotting artifacts by using SHIFT to shift
your data and coordinates by 180 degrees so that the storage matches
the plotting boundaries.

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: type conversion error - help needed urgent
Next Topic: nested structures in dlm

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 07:51:34 PDT 2025

Total time taken to generate the page: 1.91793 seconds