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

Home » Public Forums » archive » Make the plots invisible
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: Make the plots invisible [message #82082 is a reply to message #82045] Thu, 15 November 2012 06:43 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Alain writes:

> You should have read more carefully and executed the code
> I sent previously. It is pretty close of what you want.
> A slightly modified version follows:

OK, close. I think this is nearly what we want, except
for those extraneous labels. Here is a picture of
the final output:

http://www.idlcoyote.com/misc/fg_map_final.png

> The trick is to draw the map first, then to overplot the
> filled and line contours.

Yes, I would have probably discovered this trick for
myself, had I spent another 8-10 hours on the problem!
I certainly wouldn't have discovered it in the
documentation.

Thanks for your help!

David

;****************************************************
PRO FG_Map_Contour

restore, 'air.nc.data.sav'
nlevels = 12
xrange = [Min(lon), Max(lon)]
yrange = [Min(lat), Max(lat)]
center_lon = (xrange[1]-xrange[0])/2.0 + xrange[0]
nlevels = 12
levels = cgConLevels(Float(data), NLevels=nlevels+1, $
MinValue=Floor(Min(data)), STEP=step, Factor=1)
mylat = 40.6 ; Latitude of Fort Collins, Colorado.
mylon = 254.9 ; Longitude of Fort Collins, Colorado.

cgLoadCT, 2, /Reverse, /Brewer, NColors=nlevels, RGB_Table=rgb
rgb[11,*] = [255, 255, 255]

win = WINDOW(WINDOW_TITLE = 'Function Graphics', $
dimensions = [700, 600])

win.Refresh, /Disable

mp = map('Equirectangular', CENTER_LONGITUDE=180, $
POSITION=[0.1,0.1,0.90,0.80], $
LABEL_POSITION = 0, BOX_AXES=1, $
GRID_LATITUDE = 30, GRID_LONGITUDE = 45, $
/CURRENT, ASPECT_RATIO=0)
mp['Longitudes'].LABEL_ANGLE = 90

cn = contour(data, lon, lat, /OVERPLOT, $
GRID_UNITS=2, MAP_PROJECTION='Equirectangular', $
RGB_TABLE=rgb, /CURRENT, RGB_INDICES=Indgen(nlevels), $
C_VALUE=levels, /FILL)

cn1 = contour(data, lon, lat, /OVERPLOT, $
GRID_UNITS=2, MAP_PROJECTION='Equirectangular', $
RGB_TABLE=rgb, /CURRENT, $
C_VALUE=levels, C_COLOR=!Color.White)

c = MapContinents(Color=cgColor('tomato', /Triple, /Row))

cb = Colorbar(Tickname=levels, RGB_TABLE=rgb, Range=[Min(levels), $
Max(levels)], $
Major=11, /Border_On, Title='Temperature $\deg$K', $
Position=[0.1, 0.88, 0.9, 0.93], Minor=0, TAPER=3)

s = Symbol(mylon, mylat, /Data, /Current, 'Star', $
/Sym_Filled, Sym_Color='red')

win.Refresh
END
;****************************************************

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Function Graphics Take Home Message
Next Topic: Re: Quick question... OS Version

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

Current Time: Wed Oct 08 19:27:21 PDT 2025

Total time taken to generate the page: 0.00356 seconds