;+ ; ; @file_comments ; Apply GMT palette into IDL color/intervals system ; ; @categories ; ; @param MIN {in}{required} ; A real number specifying above what value we want to trace a contour ; ; @param MAX {in}{required} ; A real number specifying below what value we want to trace a contour ; ; @param INTERVALLE ; ; @param NCOUL ; ; @param NCONTOUR {out} ; Number of contour to be drawn. ; ; @param LEVEL_Z2D {in}{required} ; Vector containing values of isolignes to be traced. ; ; @param COUL ; ; @restrictions ; ; @examples ; ; @history ; ; @version ; $Id$ ; ;- PRO label_gmt, min, max, intervalle, ncoul, ncontour, level_z2d, coul ; compile_opt idl2, strictarrsubs ; @common @com_eg IF pal_type NE '2dom' THEN BEGIN ; color defined in lec_pal_gmt.pro ncontour = ncont_gmt level_z2d = levels_gmt coul = coul_gmt max = max_gmt intervalle = -1 ENDIF ELSE BEGIN ; grey_shade palette (case 1 in label) IF finite(min) EQ 0 THEN read, ' Grey shade needs a min,max :', min, max ncontour = fix((max-min)/intervalle) level_z2d = min + intervalle*findgen(ncontour) max=level_z2d[ncontour-1]+intervalle ras = report([' Number of contour intervals, plotting min & max ' + $ string(ncontour) + string(min)+ string(max),' ']) ; color index IF idx_pal EQ 0 THEN BEGIN ; build palette red = lonarr(99) red[*] = 255 red[50:98] = long((100.-float(grey_shade))/100.*255.) IF field.origin EQ 'diff' THEN BEGIN ; difference plot : lighter below first negative interval red[51:98] = long((100.-float(grey_shade_2))/100.*255.) red[1:48] = long((100.-float(grey_shade))/100.*255.) red[50] = 255 ENDIF ; first color=black ; last = white red = [0, red] red[99] = 255 ; gray scale green = red blue = red tvlct, red, green, blue ENDIF mid_index = max(where(level_z2d LE fldatt.mid)) coul = findgen(ncontour)+49-mid_index +2 ENDELSE END