;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; ; @file_comments ; Overlayeur of colorbar ; ; @categories ; Utilities ; ; @param COLNUMB ; ; ; @param CLBINF ; ; ; @param CLBSUP ; ; ; @param CLBDIV ; ; ; @keyword NOCOLORBAR ; ; ; @keyword CB_TITLE ; ; ; @keyword NOFILL ; ; ; @keyword COLOR_c ; ; ; @keyword MIN ; Scalar used to specify the min value to be drawn. ; ; @keyword MAX ; Scalar used to specify the max value to be drawn. ; ; @keyword DIVISIONS ; ; ; @keyword CB_SUBTITLE ; ; ; @keyword POST ; ; ; @keyword _EXTRA ; Used to pass your keywords ; ; @restrictions pass all argument we want thanks to _extra ; ; @history ; Sebastien Masson (smasson\@lodyc.jussieu.fr) ; 23/12/98 ; ; @version ; $Id$ ; ; @todo seb: mettre les keyword et les param ;- ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ PRO barrecouleur, colnumb, clbinf, clbsup, clbdiv $ , NOCOLORBAR = nocolorbar, CB_TITLE = cb_title $ , NOFILL = nofill, COLOR_c = color_c $ , MIN = min, MAX = max, divisions = divisions $ , CB_SUBTITLE = cb_subtitle, POST = post, _extra = ex ;------------------------------------------------------------ ; compile_opt idl2, strictarrsubs ; @cm_general IF NOT keyword_set(key_forgetold) THEN BEGIN @updatekwd ENDIF ;------------------------------------------------------------ if keyword_set(min) then clbinf = min if keyword_set(max) then clbsup = min if keyword_set(divisions) THEN clbdiv = divisions nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) $ + keyword_set(color_c) ;------------------------------------------------------------ def_myuniquetmpdir ; IF lmgr(/demo) EQ 1 THEN BEGIN ; if we are in demo mode, we cannot save the parameters in a temporary file... @cm_demomode_used ; colorbarparam = {colnumb:colnumb, clbinf:clbinf $ , clbsup:clbsup, clbdiv:clbdiv} ENDIF ELSE BEGIN save, colnumb, clbinf, clbsup, clbdiv $ , file = myuniquetmpdir + '4colorbar.dat' ENDELSE ;------------------------------------------------------------ if keyword_set(nocolorbar) then return ;------------------------------------------------------------ ancienx = !x ancieny = !y ancienp = !p reinitplt !x.style = 1 !y.style = 1 ;------------------------------------------------------------ colorbar, cb_color = 0, cb_charsize = ancienp.charsize $ , pscolor = keyword_set(post), division = clbdiv $ , min = clbinf, max = clbsup $ , cb_title = cb_title, discret = colnumb, _extra = ex ;------------------------------------------------------------ !x= ancienx !y= ancieny !p= ancienp ; return end