;+ ; NAME: ; mapdisp ; PURPOSE: (one line) ; Display a map generated from a location array ; DESCRIPTION: ; Display a map generated from a location array ; CATEGORY: ; Volatile Transport ; CALLING SEQUENCE: ; mapdisp, val ; KEYWORD INPUTS: ; truecolor : set if val is 24-bit truecolor (e.g., #0000ff for red) ; zmin : minimum to display ; zmax : maximum to display ; indx_map : if set, use for the indx_map ; name_loc2map : if set, use to calculate the indx_map ; noiau : if set. don't append "(IAU)" to labels ; OUTPUTS: ; SIDE EFFECT ; plots a map ; MODIFICATION HISTORY: ; Written 2011 Aug 3, by Leslie Young, SwRI ; Aug 18 LAY rework the inputs ; 2011 Oct 20 LAY Default to bin=500/nx, /mag ;- pro mapdisp, val, val_map=val_map, nan=nan, truecolor=truecolor,mtitle=mtitle, old=old,fn=fn, noiau=noiau,$ _extra=extra, wlon=wlon common loc_map, indx_map_c, name_loc2map_c val_map = loc2map(val, name_loc2map=name_loc2map, nan=nan) nxnyn, val_map, nx,ny bin_default = ceil(500./nx) if size(extra,/tname) eq 'STRUCT' then begin if not tag_exist(extra , 'BIN') then begin extra = struct_addfield(extra, 'BIN', bin_default) endif if not tag_exist(extra , 'MAG') then begin extra = struct_addfield(extra, 'MAG', 1) endif endif else begin extra = {BIN : bin_default, MAG:1} endelse if keyword_set(truecolor) then begin val_map = truecolorconv(val_map) ; help, val_map end window,0,xs=1,ys=1, retain=2 device, decomp=keyword_set(truecolor) plotsub, val_map, /noti, _extra=extra, pos=pos, dx0=70 xtit = 'Longitude' ytit = 'Latitude' if keyword_set(iau) then begin xtit += ' (IAU)' ytit += ' (IAU)' endif ;axis, ya=0, YRANGE = [-90,90], yticki=30, ytit='Latitude (IAU)' ;axis, xticki=60,xs=0,xa=0,xr=[0,360], xtit='Longitude (IAU)' if keyword_set(mtitle) then xyouts, nx/2., ny, mtitle, al=0.5 if keyword_set(wlon) then begin xr=[-360,0] xtickn = ['360','300','240','180','120','60','0'] xtit = 'West ' + xtit endif else begin xr=[0,360] xtickn = '' endelse plot, xr,[-90,90], pos=pos+[0,0,-1,-1], /nodata, /device, /noer, $ xs=1, xtickinterval=60, xminor = 6, xtit=xtit, xtickname = xtickn, $ ys=1, ytickinterval=30, yminor = 3, ytit=ytit if keyword_set(fn) then tv2im, fn, true=truecolor, /corner end