source: trunk/SRC/ToBeReviewed/PLOTS/style.pro @ 262

Last change on this file since 262 was 262, checked in by pinsard, 17 years ago

corrections of some headers and parameters and keywords case. change of pro2href to replace proidl

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1;+
2;
3; @file_comments
4; Choose the way to trace isolines.
5;
6; @categories
7; Graphics
8;
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.
14;
15; @param LINESTYLE {out}
16; Vector used to define the isocontour's style
17;       Comment: remember:
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     
25;
26; @param THICK {out}
27; Vector defining the thick of the isoline.
28;
29; @history
30; Sebastien Masson (smasson\@lodyc.jussieu.fr)
31;
32; @version
33; $Id$
34;
35;-
36;
37PRO style, labstyle, level_z2d, linestyle, thick
38;
39  compile_opt idl2, strictarrsubs
40;
41   case labstyle of
42      0: begin
43;series: Two thin continuous lines, one boldface continuous line
44         thick=[1,1,2]
45         linestyle=[0]
46         return
47      end
48      1: begin
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.
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))
54         c=replicate(2,fix(n_elements(level_z2d)/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
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.
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)
71         c=replicate(2,n)
72         if seuil eq level_z2d[n] then begin
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)
83         seuil = level_z2d[1+n/2]
84
85         thick = intarr(n)
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
90
91         linestyle = intarr(n)
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
96
97         labels = intarr(n)
98         labels[indgen(n/2)*2] = 1
99         labels[n/2] = 0
100
101         return
102      end
103      4: begin
104; Boldface continuous trait.
105         seuil = 1.e-6
106         thick=replicate(.5,  n_elements(level_z2d))
107         linestyle=[0]
108         rien=where(abs(level_z2d)/max(abs(level_z2d)) LT seuil)
109         if rien[0] NE -1 then thick[rien[0]] = 3
110      end
111      else: begin
112         ras = report('Le numero de labstyle demande n''existe pas')
113         stop
114      end
115   endcase
116   return
117end
Note: See TracBrowser for help on using the repository browser.