[2] | 1 | ;------------------------------------------------------------ |
---|
| 2 | ;------------------------------------------------------------ |
---|
| 3 | ;------------------------------------------------------------ |
---|
| 4 | ;+ |
---|
| 5 | ; |
---|
[142] | 6 | ; @file_comments |
---|
[226] | 7 | ; Overlayer of colorbar |
---|
[2] | 8 | ; |
---|
[142] | 9 | ; @categories |
---|
[157] | 10 | ; Utilities |
---|
[2] | 11 | ; |
---|
[163] | 12 | ; @param COLNUMB |
---|
| 13 | ; |
---|
| 14 | ; |
---|
| 15 | ; @param CLBINF |
---|
| 16 | ; |
---|
| 17 | ; |
---|
| 18 | ; @param CLBSUP |
---|
| 19 | ; |
---|
| 20 | ; |
---|
| 21 | ; @param CLBDIV |
---|
| 22 | ; |
---|
| 23 | ; |
---|
| 24 | ; @keyword NOCOLORBAR |
---|
| 25 | ; |
---|
[226] | 26 | ; |
---|
[163] | 27 | ; @keyword CB_TITLE |
---|
| 28 | ; |
---|
[226] | 29 | ; |
---|
[163] | 30 | ; @keyword NOFILL |
---|
| 31 | ; |
---|
[226] | 32 | ; |
---|
[163] | 33 | ; @keyword COLOR_c |
---|
| 34 | ; |
---|
[226] | 35 | ; |
---|
[163] | 36 | ; @keyword MIN |
---|
| 37 | ; Scalar used to specify the min value to be drawn. |
---|
| 38 | ; |
---|
| 39 | ; @keyword MAX |
---|
| 40 | ; Scalar used to specify the max value to be drawn. |
---|
| 41 | ; |
---|
| 42 | ; @keyword DIVISIONS |
---|
| 43 | ; |
---|
[226] | 44 | ; |
---|
[163] | 45 | ; @keyword CB_SUBTITLE |
---|
| 46 | ; |
---|
[226] | 47 | ; |
---|
[163] | 48 | ; @keyword POST |
---|
| 49 | ; |
---|
[226] | 50 | ; |
---|
[163] | 51 | ; @keyword _EXTRA |
---|
| 52 | ; Used to pass your keywords |
---|
| 53 | ; |
---|
[142] | 54 | ; @restrictions pass all argument we want thanks to _extra |
---|
[2] | 55 | ; |
---|
[142] | 56 | ; @history |
---|
[157] | 57 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
[142] | 58 | ; 23/12/98 |
---|
[2] | 59 | ; |
---|
[142] | 60 | ; @version |
---|
| 61 | ; $Id$ |
---|
| 62 | ; |
---|
| 63 | ; @todo seb: mettre les keyword et les param |
---|
[2] | 64 | ;- |
---|
| 65 | ;------------------------------------------------------------ |
---|
| 66 | ;------------------------------------------------------------ |
---|
| 67 | ;------------------------------------------------------------ |
---|
[37] | 68 | PRO barrecouleur, colnumb, clbinf, clbsup, clbdiv $ |
---|
| 69 | , NOCOLORBAR = nocolorbar, CB_TITLE = cb_title $ |
---|
| 70 | , NOFILL = nofill, COLOR_c = color_c $ |
---|
[152] | 71 | , MIN = min, MAX = max, divisions = divisions $ |
---|
[37] | 72 | , CB_SUBTITLE = cb_subtitle, POST = post, _extra = ex |
---|
[2] | 73 | ;------------------------------------------------------------ |
---|
[114] | 74 | ; |
---|
| 75 | compile_opt idl2, strictarrsubs |
---|
| 76 | ; |
---|
[37] | 77 | @cm_general |
---|
| 78 | IF NOT keyword_set(key_forgetold) THEN BEGIN |
---|
| 79 | @updatekwd |
---|
| 80 | ENDIF |
---|
| 81 | ;------------------------------------------------------------ |
---|
| 82 | if keyword_set(min) then clbinf = min |
---|
| 83 | if keyword_set(max) then clbsup = min |
---|
| 84 | if keyword_set(divisions) THEN clbdiv = divisions |
---|
| 85 | nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) $ |
---|
[226] | 86 | + keyword_set(color_c) |
---|
[37] | 87 | ;------------------------------------------------------------ |
---|
| 88 | def_myuniquetmpdir |
---|
| 89 | ; |
---|
| 90 | IF lmgr(/demo) EQ 1 THEN BEGIN |
---|
| 91 | ; if we are in demo mode, we cannot save the parameters in a temporary file... |
---|
| 92 | @cm_demomode_used |
---|
| 93 | ; |
---|
| 94 | colorbarparam = {colnumb:colnumb, clbinf:clbinf $ |
---|
| 95 | , clbsup:clbsup, clbdiv:clbdiv} |
---|
| 96 | ENDIF ELSE BEGIN |
---|
| 97 | save, colnumb, clbinf, clbsup, clbdiv $ |
---|
| 98 | , file = myuniquetmpdir + '4colorbar.dat' |
---|
| 99 | ENDELSE |
---|
| 100 | ;------------------------------------------------------------ |
---|
[226] | 101 | if keyword_set(nocolorbar) then return |
---|
[37] | 102 | ;------------------------------------------------------------ |
---|
[2] | 103 | ancienx = !x |
---|
| 104 | ancieny = !y |
---|
| 105 | ancienp = !p |
---|
| 106 | reinitplt |
---|
| 107 | !x.style = 1 |
---|
| 108 | !y.style = 1 |
---|
| 109 | ;------------------------------------------------------------ |
---|
[37] | 110 | colorbar, cb_color = 0, cb_charsize = ancienp.charsize $ |
---|
| 111 | , pscolor = keyword_set(post), division = clbdiv $ |
---|
| 112 | , min = clbinf, max = clbsup $ |
---|
| 113 | , cb_title = cb_title, discret = colnumb, _extra = ex |
---|
| 114 | ;------------------------------------------------------------ |
---|
[2] | 115 | !x= ancienx |
---|
| 116 | !y= ancieny |
---|
| 117 | !p= ancienp |
---|
[37] | 118 | ; |
---|
[2] | 119 | return |
---|
| 120 | end |
---|