Map_set contour on TV image?? [message #37420] |
Thu, 18 December 2003 12:54  |
shson
Messages: 8 Registered: August 2003
|
Junior Member |
|
|
Dear Sir,
I want to draw contour lines on a image.
I wrote some codes as follows:
-----------------------
Window, 1, color=256, xs=500, ys=500
Map_set, /Cylindrical, limit=[28,117,42,132], /continents $
, /hires, Mlinethick=1., /NoErase, /Isotropic
; , position=[0.05,0.05,0.95,0.95]
TVSCL, Rotate(scan, 7)
; Contour, data, xlon, ylat, /follow, position=[0.05,0.05,0.95,0.95] $
; , NLevels=20, XStyle=1, YStyle=1, /NoErase, /Overplot
Map_continents, /hires, color=255, /fill_continents, /cylindrical
Map_continents, /coast, color=0, /hires, /cylindrical
; Map_grid, charsize=1.25, color=200, latdel=2, londel=2 $
; , /box_axes, GlineStyle=2
-----------------------
However, the map continents & coast do not fit on the image.
What do I need to modify?
If anyone know about it, please let me know.
Thank you.
Have a nice day
Son
|
|
|
Re: Map_set contour on TV image?? [message #37516 is a reply to message #37420] |
Thu, 18 December 2003 19:15  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Son writes:
> I want to draw contour lines on a image.
> I wrote some codes as follows:
> -----------------------
> Window, 1, color=256, xs=500, ys=500
> Map_set, /Cylindrical, limit=[28,117,42,132], /continents $
> , /hires, Mlinethick=1., /NoErase, /Isotropic
> ; , position=[0.05,0.05,0.95,0.95]
> TVSCL, Rotate(scan, 7)
>
> ; Contour, data, xlon, ylat, /follow, position=[0.05,0.05,0.95,0.95] $
> ; , NLevels=20, XStyle=1, YStyle=1, /NoErase, /Overplot
>
> Map_continents, /hires, color=255, /fill_continents, /cylindrical
> Map_continents, /coast, color=0, /hires, /cylindrical
> ; Map_grid, charsize=1.25, color=200, latdel=2, londel=2 $
> ; , /box_axes, GlineStyle=2
> -----------------------
> However, the map continents & coast do not fit on the image.
> What do I need to modify?
> If anyone know about it, please let me know.
Change this:
TVSCL, Rotate(scan, 7)
To this:
warp = Map_Image(Rotate(scan,7), LatMin=28, LatMax=42, $
LonMin=117, LonMax=132, xx, yy, xs, ys)
TV, warp, xx, yy, XSize=xs, YSize=ys
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|