[2] | 1 | ;------------------------------------------------------------ |
---|
| 2 | ;------------------------------------------------------------ |
---|
| 3 | ;------------------------------------------------------------ |
---|
| 4 | ;+ |
---|
| 5 | ; |
---|
[142] | 6 | ; @file_comments |
---|
| 7 | ; Overlayeur of colorbar |
---|
[2] | 8 | ; |
---|
[142] | 9 | ; @categories |
---|
| 10 | ; utilities |
---|
[2] | 11 | ; |
---|
[142] | 12 | ; @restrictions pass all argument we want thanks to _extra |
---|
[2] | 13 | ; |
---|
[142] | 14 | ; @history |
---|
| 15 | ; Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
| 16 | ; 23/12/98 |
---|
[2] | 17 | ; |
---|
[142] | 18 | ; @version |
---|
| 19 | ; $Id$ |
---|
| 20 | ; |
---|
| 21 | ; @todo seb: mettre les keyword et les param |
---|
[2] | 22 | ;- |
---|
| 23 | ;------------------------------------------------------------ |
---|
| 24 | ;------------------------------------------------------------ |
---|
| 25 | ;------------------------------------------------------------ |
---|
[37] | 26 | PRO barrecouleur, colnumb, clbinf, clbsup, clbdiv $ |
---|
| 27 | , NOCOLORBAR = nocolorbar, CB_TITLE = cb_title $ |
---|
| 28 | , NOFILL = nofill, COLOR_c = color_c $ |
---|
[152] | 29 | , MIN = min, MAX = max, divisions = divisions $ |
---|
[37] | 30 | , CB_SUBTITLE = cb_subtitle, POST = post, _extra = ex |
---|
[2] | 31 | ;------------------------------------------------------------ |
---|
[114] | 32 | ; |
---|
| 33 | compile_opt idl2, strictarrsubs |
---|
| 34 | ; |
---|
[37] | 35 | @cm_general |
---|
| 36 | IF NOT keyword_set(key_forgetold) THEN BEGIN |
---|
| 37 | @updatekwd |
---|
| 38 | ENDIF |
---|
| 39 | ;------------------------------------------------------------ |
---|
| 40 | if keyword_set(min) then clbinf = min |
---|
| 41 | if keyword_set(max) then clbsup = min |
---|
| 42 | if keyword_set(divisions) THEN clbdiv = divisions |
---|
| 43 | nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) $ |
---|
| 44 | + keyword_set(color_c) |
---|
| 45 | ;------------------------------------------------------------ |
---|
| 46 | def_myuniquetmpdir |
---|
| 47 | ; |
---|
| 48 | IF lmgr(/demo) EQ 1 THEN BEGIN |
---|
| 49 | ; if we are in demo mode, we cannot save the parameters in a temporary file... |
---|
| 50 | @cm_demomode_used |
---|
| 51 | ; |
---|
| 52 | colorbarparam = {colnumb:colnumb, clbinf:clbinf $ |
---|
| 53 | , clbsup:clbsup, clbdiv:clbdiv} |
---|
| 54 | ENDIF ELSE BEGIN |
---|
| 55 | save, colnumb, clbinf, clbsup, clbdiv $ |
---|
| 56 | , file = myuniquetmpdir + '4colorbar.dat' |
---|
| 57 | ENDELSE |
---|
| 58 | ;------------------------------------------------------------ |
---|
| 59 | if keyword_set(nocolorbar) then return |
---|
| 60 | ;------------------------------------------------------------ |
---|
[2] | 61 | ancienx = !x |
---|
| 62 | ancieny = !y |
---|
| 63 | ancienp = !p |
---|
| 64 | reinitplt |
---|
| 65 | !x.style = 1 |
---|
| 66 | !y.style = 1 |
---|
| 67 | ;------------------------------------------------------------ |
---|
[37] | 68 | colorbar, cb_color = 0, cb_charsize = ancienp.charsize $ |
---|
| 69 | , pscolor = keyword_set(post), division = clbdiv $ |
---|
| 70 | , min = clbinf, max = clbsup $ |
---|
| 71 | , cb_title = cb_title, discret = colnumb, _extra = ex |
---|
| 72 | ;------------------------------------------------------------ |
---|
[2] | 73 | !x= ancienx |
---|
| 74 | !y= ancieny |
---|
| 75 | !p= ancienp |
---|
[37] | 76 | ; |
---|
[2] | 77 | return |
---|
| 78 | end |
---|