; ; Apply GMT palette into IDL color/intervals system ; PRO label_gmt, min, max, intervalle, ncoul, ncontour, level_z2d, coul @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 print, ' Number of contour intervals, plotting min & max ', ncontour, min, max print, ' ' ; 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