pro plot_color_map_sub, data,lat,lon,dmin,dmax,dtyp,dlab,clat,clon,latmin,latmax,$ tit,posmap,dobar,eras,ncolors,topcolor,offset,black,white ;--------------------------------------------------------------------- ; Plot a color contour map with an Earth map projection underneath. ; ; Input: ; data.......data to contour, fltarr(longitude,latitude) ; lat........the latitude (deg), fltarr(latitude) ; lon........longitude (deg), fltarr(longitude) ; dmin.......min data value to contour ; dmax.......max data value to contour ; dtyp.......0 = linear scale, 1 = log10 scale ; dlab.......label for the data, string ; clat.......map projection center latitude (deg) ; clon.......map projection center longitude (deg) ; latmin.....min latitude for plot (deg) ; latmax.....max latitude for plot (deg) ; tit........plot title, string ; posmap.....plot position for map, [min X, min Y, max X, max Y], e.g., [0.2,0.5,0.8,0.9] ; dobar......'y' = plot a color bar ; eras.......0 = do not erase the page, 1 = erase the page ; ncolors....# of colors in the color table ; topcolor...# of highest color in the color table ; offset..... ; balck......# of black in the color table ; white......# of white in the color table ; ; Source: Mark Hervig, GATS Inc. ;--------------------------------------------------------------------- ;- assign color levels for the color contours nint = 50. colr = (findgen(nint)+1) * (topcolor/nint) ; nint colors colr(0) = white ;- assign contour values if (dmin eq 0) then dmin = min(data) if (dmax eq 0) then dmax = max(data) lvls = findgen(nint)*(dmax-dmin)/(nint-1)+dmin if (dtyp eq 1) then $ lvls = findgen(nint)*(alog10(dmax)-alog10(dmin))/float(nint)+alog10(dmin) ;- setup the map projection map_set,clat,clon, limit=[latmin,0,latmax,360], noerase=eras,$ cont=1,grid=1,label=1,latalign=0,lonalign=0,latlab=0.0,$ latdel=10.0,londel=45.0,/ORTHO,$ position=posmap,color=black ;- color contour the data contour,data,lon,lat,position=posmap,color=black,/overplot, $ levels=lvls,c_colors=colr,/closed,/fill,/follow,$ xrange=[0,360],/xstyle, $ yrange=[latmin,latmax],/ystyle ;- re-draw the map projection over the data map_set,clat,clon, limit=[latmin,0,latmax,360], /noerase, title=tit,$ cont=1,grid=1,label=1,latalign=0,lonalign=0,latlab=0.0,$ latdel=10.0,londel=45.0,/ORTHO,$ position=posmap,color=black ;- draw a color bar if (dobar eq 'y') then begin posbar = [posmap(2)+0.01,posmap(1)+0.01,posmap(2)+0.03,posmap(3)-0.01] color_bar,ncolors,offset,black,dmin,dmax,dlab,dtyp,posbar,2 endif ;- done return end