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

Home » Public Forums » archive » Re: matchup of Map_set & contour
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: matchup of Map_set & contour [message #36273] Wed, 03 September 2003 07:43 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Son writes:

> I want to overlap contour lines on a map.
> However, I think it doesn't match exactly (I checked the gridlines)..
> especially, as it goes to the edge..
> Could someone know how to fix it?

Well, I think you want to call CONTOUR *after* you do your
MAP_SET. This will require you to use the OVERPLOT keyword.
And on map projections you MUST use the CELL_FILL keyword
on the CONTOUR command, rather than the FILL keyword. I think
the code should look more like this:

;-------------------------------
lon = FINDGEN(91)
lat = FINDGEN(115)
x = 17.0 + lon*(1/6.0)
y = 23.0 + lat*(1/6.0)

seed=1L
temp = sin(x)^2 * cos(x)
z = DIST(91,115)

LOADCT, 39

WINDOW,1,TITLE='WORLD MAP',xsize=800,ysize=900

MAP_SET, /CYLINDRICAL, LIMIT=[23.0,17.0,42.0,32.0], /CONTINENTS $
, /HIRES, Mlinethick=1., position=[0.1,0.1,0.9,0.9] $
, /Noerase;, /ISOTROPIC
CONTOUR, z, x, y, /Follow, NLevels=20, XStyle=1, $
YStyle=1, /NoErase, /CELL_FILL, /OVERPLOT
MAP_CONTINENTS, /HIRES,color=255, /FILL_CONTINENTS, /CYLINDRICAL
MAP_CONTINENTS, /COAST, color=0, /HIRES, /CYLINDRICAL
MAP_GRID, charsize=1.25, color=100 ,latdel=2, londel=2, $
/BOX_axes, GLineStyle=2


That seems to look correct (more or less) to me. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: matchup of Map_set & contour
Next Topic: Re: Can a CALL_EXTERNAL .dll create a window?

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

Current Time: Sat Oct 11 03:08:17 PDT 2025

Total time taken to generate the page: 0.56439 seconds