1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; |
---|
6 | ; @file_comments |
---|
7 | ; Overlayeur of colorbar |
---|
8 | ; |
---|
9 | ; @categories |
---|
10 | ; Utilities |
---|
11 | ; |
---|
12 | ; @param COLNUMB |
---|
13 | ; |
---|
14 | ; |
---|
15 | ; @param CLBINF |
---|
16 | ; |
---|
17 | ; |
---|
18 | ; @param CLBSUP |
---|
19 | ; |
---|
20 | ; |
---|
21 | ; @param CLBDIV |
---|
22 | ; |
---|
23 | ; |
---|
24 | ; @keyword NOCOLORBAR |
---|
25 | ; |
---|
26 | ; |
---|
27 | ; @keyword CB_TITLE |
---|
28 | ; |
---|
29 | ; |
---|
30 | ; @keyword NOFILL |
---|
31 | ; |
---|
32 | ; |
---|
33 | ; @keyword COLOR_c |
---|
34 | ; |
---|
35 | ; |
---|
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 | ; |
---|
44 | ; |
---|
45 | ; @keyword CB_SUBTITLE |
---|
46 | ; |
---|
47 | ; |
---|
48 | ; @keyword POST |
---|
49 | ; |
---|
50 | ; |
---|
51 | ; @keyword _EXTRA |
---|
52 | ; Used to pass your keywords |
---|
53 | ; |
---|
54 | ; @restrictions pass all argument we want thanks to _extra |
---|
55 | ; |
---|
56 | ; @history |
---|
57 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
58 | ; 23/12/98 |
---|
59 | ; |
---|
60 | ; @version |
---|
61 | ; $Id$ |
---|
62 | ; |
---|
63 | ; @todo seb: mettre les keyword et les param |
---|
64 | ;- |
---|
65 | ;------------------------------------------------------------ |
---|
66 | ;------------------------------------------------------------ |
---|
67 | ;------------------------------------------------------------ |
---|
68 | PRO barrecouleur, colnumb, clbinf, clbsup, clbdiv $ |
---|
69 | , NOCOLORBAR = nocolorbar, CB_TITLE = cb_title $ |
---|
70 | , NOFILL = nofill, COLOR_c = color_c $ |
---|
71 | , MIN = min, MAX = max, divisions = divisions $ |
---|
72 | , CB_SUBTITLE = cb_subtitle, POST = post, _extra = ex |
---|
73 | ;------------------------------------------------------------ |
---|
74 | ; |
---|
75 | compile_opt idl2, strictarrsubs |
---|
76 | ; |
---|
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) $ |
---|
86 | + keyword_set(color_c) |
---|
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 | ;------------------------------------------------------------ |
---|
101 | if keyword_set(nocolorbar) then return |
---|
102 | ;------------------------------------------------------------ |
---|
103 | ancienx = !x |
---|
104 | ancieny = !y |
---|
105 | ancienp = !p |
---|
106 | reinitplt |
---|
107 | !x.style = 1 |
---|
108 | !y.style = 1 |
---|
109 | ;------------------------------------------------------------ |
---|
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 | ;------------------------------------------------------------ |
---|
115 | !x= ancienx |
---|
116 | !y= ancieny |
---|
117 | !p= ancienp |
---|
118 | ; |
---|
119 | return |
---|
120 | end |
---|