[2] | 1 | ;+ |
---|
| 2 | ; |
---|
[231] | 3 | ; @file_comments |
---|
[142] | 4 | ; Choose the way to trace isolines. |
---|
[2] | 5 | ; |
---|
[142] | 6 | ; @categories |
---|
[157] | 7 | ; Graphics |
---|
[2] | 8 | ; |
---|
[142] | 9 | ; @param LABSTYLE {in}{required} |
---|
| 10 | ; Number to which the style of drawing choosen refer to. |
---|
| 11 | ; |
---|
| 12 | ; @param LEVEL_Z2D {in}{required} |
---|
| 13 | ; Vector containing values of isolignes to be traced. |
---|
[2] | 14 | ; |
---|
[142] | 15 | ; @param LINESTYLE {out} |
---|
| 16 | ; Vector used to define the isocontour's style |
---|
[163] | 17 | ; Comment: remember: |
---|
[2] | 18 | ; Index Linestyle |
---|
| 19 | ; 0 Solid |
---|
| 20 | ; 1 Dotted |
---|
| 21 | ; 2 Dashed |
---|
| 22 | ; 3 Dash Dot |
---|
| 23 | ; 4 Dash Dot Dot Dot |
---|
| 24 | ; 5 Long Dashes |
---|
[231] | 25 | ; |
---|
[142] | 26 | ; @param THICK {out} |
---|
| 27 | ; Vector defining the thick of the isoline. |
---|
[2] | 28 | ; |
---|
[142] | 29 | ; @history |
---|
[157] | 30 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
[2] | 31 | ; |
---|
[142] | 32 | ; @version |
---|
| 33 | ; $Id$ |
---|
[2] | 34 | ; |
---|
| 35 | ;- |
---|
[114] | 36 | ; |
---|
[262] | 37 | PRO style, labstyle, level_z2d, linestyle, thick |
---|
[231] | 38 | ; |
---|
[114] | 39 | compile_opt idl2, strictarrsubs |
---|
| 40 | ; |
---|
[2] | 41 | case labstyle of |
---|
| 42 | 0: begin |
---|
[142] | 43 | ;series: Two thin continuous lines, one boldface continuous line |
---|
[2] | 44 | thick=[1,1,2] |
---|
| 45 | linestyle=[0] |
---|
| 46 | return |
---|
| 47 | end |
---|
| 48 | 1: begin |
---|
[142] | 49 | ;series: Before the middle of levels: thin dash. Then thin continuous trait. |
---|
| 50 | ; If the middle of the drawing is drawn, it is in boldface continuous trait. |
---|
[2] | 51 | impair=n_elements(level_z2d)-2*fix(n_elements(level_z2d)/2) |
---|
| 52 | a=replicate(0,fix(n_elements(level_z2d)/2)) |
---|
| 53 | b=replicate(1,fix(n_elements(level_z2d)/2)) |
---|
[231] | 54 | c=replicate(2,fix(n_elements(level_z2d)/2)) |
---|
[2] | 55 | if impair then begin |
---|
| 56 | thick=[b,2,b] |
---|
| 57 | linestyle=[c,0,a] |
---|
| 58 | endif else begin |
---|
| 59 | thick=[0] |
---|
| 60 | linestyle=[c,a] |
---|
| 61 | endelse |
---|
| 62 | return |
---|
| 63 | end |
---|
| 64 | 2: begin |
---|
[142] | 65 | ;series: Before the sill (defined by answering to a question): thin dash. |
---|
| 66 | ; Then thin continuous trait. If the sill is drawn, it is in boldface continuous trait. |
---|
[2] | 67 | seuil=xquestion('Quelle est la limite tirets/trait continu? ','0') |
---|
| 68 | seuil = float(seuil) |
---|
| 69 | rien=where(level_z2d lt seuil,n) |
---|
| 70 | a=replicate(0,n_elements(level_z2d)-n) |
---|
[231] | 71 | c=replicate(2,n) |
---|
[114] | 72 | if seuil eq level_z2d[n] then begin |
---|
[2] | 73 | thick=[replicate(1,n),2,replicate(1,n_elements(level_z2d)-1-n)] |
---|
| 74 | linestyle=[c,a] |
---|
| 75 | endif else begin |
---|
| 76 | thick=[0] |
---|
| 77 | linestyle=[c,a] |
---|
| 78 | endelse |
---|
| 79 | return |
---|
| 80 | end |
---|
| 81 | 3: begin |
---|
| 82 | n = n_elements(level_z2d) |
---|
[114] | 83 | seuil = level_z2d[1+n/2] |
---|
[2] | 84 | |
---|
| 85 | thick = intarr(n) |
---|
[114] | 86 | thick[indgen(n/4)*4] = 1 |
---|
| 87 | thick[indgen(n/4)*4+1] = 1 |
---|
| 88 | thick[indgen(n/4)*4+2] = 2 |
---|
| 89 | thick[indgen(n/4)*4+3] = 1 |
---|
[2] | 90 | |
---|
| 91 | linestyle = intarr(n) |
---|
[114] | 92 | linestyle[indgen(n/4)*4] = 3 |
---|
| 93 | linestyle[indgen(n/4)*4+1] = 0 |
---|
| 94 | linestyle[indgen(n/4)*4+2] = 0 |
---|
| 95 | linestyle[indgen(n/4)*4+3] = 0 |
---|
[2] | 96 | |
---|
| 97 | labels = intarr(n) |
---|
[114] | 98 | labels[indgen(n/2)*2] = 1 |
---|
| 99 | labels[n/2] = 0 |
---|
[2] | 100 | |
---|
| 101 | return |
---|
| 102 | end |
---|
| 103 | 4: begin |
---|
[142] | 104 | ; Boldface continuous trait. |
---|
[2] | 105 | seuil = 1.e-6 |
---|
[42] | 106 | thick=replicate(.5, n_elements(level_z2d)) |
---|
[2] | 107 | linestyle=[0] |
---|
| 108 | rien=where(abs(level_z2d)/max(abs(level_z2d)) LT seuil) |
---|
[42] | 109 | if rien[0] NE -1 then thick[rien[0]] = 3 |
---|
[2] | 110 | end |
---|
| 111 | else: begin |
---|
| 112 | ras = report('Le numero de labstyle demande n''existe pas') |
---|
| 113 | stop |
---|
| 114 | end |
---|
| 115 | endcase |
---|
| 116 | return |
---|
| 117 | end |
---|