1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; |
---|
6 | ; @file_comments |
---|
7 | ; Overlayeur of colorbar |
---|
8 | ; |
---|
9 | ; @categories |
---|
10 | ; Utilities |
---|
11 | ; |
---|
12 | ; @restrictions pass all argument we want thanks to _extra |
---|
13 | ; |
---|
14 | ; @history |
---|
15 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
16 | ; 23/12/98 |
---|
17 | ; |
---|
18 | ; @version |
---|
19 | ; $Id$ |
---|
20 | ; |
---|
21 | ; @todo seb: mettre les keyword et les param |
---|
22 | ;- |
---|
23 | ;------------------------------------------------------------ |
---|
24 | ;------------------------------------------------------------ |
---|
25 | ;------------------------------------------------------------ |
---|
26 | PRO barrecouleur, colnumb, clbinf, clbsup, clbdiv $ |
---|
27 | , NOCOLORBAR = nocolorbar, CB_TITLE = cb_title $ |
---|
28 | , NOFILL = nofill, COLOR_c = color_c $ |
---|
29 | , MIN = min, MAX = max, divisions = divisions $ |
---|
30 | , CB_SUBTITLE = cb_subtitle, POST = post, _extra = ex |
---|
31 | ;------------------------------------------------------------ |
---|
32 | ; |
---|
33 | compile_opt idl2, strictarrsubs |
---|
34 | ; |
---|
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 | ;------------------------------------------------------------ |
---|
61 | ancienx = !x |
---|
62 | ancieny = !y |
---|
63 | ancienp = !p |
---|
64 | reinitplt |
---|
65 | !x.style = 1 |
---|
66 | !y.style = 1 |
---|
67 | ;------------------------------------------------------------ |
---|
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 | ;------------------------------------------------------------ |
---|
73 | !x= ancienx |
---|
74 | !y= ancieny |
---|
75 | !p= ancienp |
---|
76 | ; |
---|
77 | return |
---|
78 | end |
---|