source: trunk/SRC/ToBeReviewed/PLOTS/LABEL/label.pro @ 495

Last change on this file since 495 was 495, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo; dupe empty lines; trailing blanks

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1;+
2;
3; @file_comments
4; Allows to choose the type of the label we want to use at the time of a
5; contour.
6;
7; @categories
8; Graphics
9;
10; @param CAS {in}{required}
11; Number of the type of the label we want to trace
12;
13; @param MIN {in}{required}
14; Smallest value for the drawing of the contour.
15;
16; @param MAX {in}{required}
17; Biggest value for the drawing of the contour.
18;
19; @keyword INTERVALLE {default=20}
20; Value of an interval between two isolines. By default, it is calculated to
21; draw 20 isolines. In all cases, this keyword must be returned have a nice
22; caption. If levels do not contain regular intervals, put it at -1.
23;
24; @keyword NLEVEL {default=20}
25; Number of contour to be drawn. Active if LABEL=0 or is not specified.
26;
27; @param NCONTOUR {out}
28; Number of contour to be drawn.
29;
30; @param LEVEL_Z2D {out}
31; Vector containing values of contours we draw.
32;
33; @param COLNUMB {out}
34; Vector containing the number of colors which will serve to fill contours.
35;
36; @uses
37; <pro>common</pro>
38;
39; @history
40; Sebastien Masson (smasson\@lodyc.jussieu.fr)
41;                  7/5/98
42;
43; @version
44; $Id$
45;
46;-
47PRO label, cas, min, max, ncontour, level_z2d, colnumb, NLEVEL=nlevel $
48          ,INTERVALLE=intervalle, STRICTFILL=strictfill
49;
50  compile_opt idl2, strictarrsubs
51;
52@common
53;
54   ncoul = !D.n_Colors < 256
55   case cas of
56      0: begin
57; nlevel label between the min and the max
58         if keyword_set(Nlevel) eq 0 then ncontour=20 else ncontour=nlevel
59         ncontour = 1 > ncontour
60         level_z2d  = min + (max-min)*(findgen(Ncontour)/Ncontour)
61         colnumb    = ncoul*(findgen(Ncontour))/Ncontour+ncoul/(2*ncontour)
62         intervalle = level_z2d[1]-level_z2d[0]
63      end
64      1: begin
65; a certain number of label from the min to the nearest possible to the
66; max with a constant step by interval
67         ncontour  = fix((max-min)/intervalle)
68         ncontour = 1 > ncontour
69         level_z2d = min + intervalle*findgen(Ncontour)
70         colnumb   = ncoul*(findgen(Ncontour))/Ncontour+ncoul/(2*ncontour)
71         max=level_z2d[Ncontour-1]+intervalle
72      end
73; label to do same sss than dessier
74
75      2: begin
76         lct, 63, file = 'palette.tbl'
77         level_z2d  = [20, 25, 30, 31, 32, 33, 33.5, 34+.25*findgen(16)]
78         ncontour=23
79         colnumb    = findgen(23)+1
80         masx = 37.75
81         intervalle = -1
82         return
83      end
84      3: begin
85; Readinf of intervals + palette in the file GMT
86
87         label_gmt, min, max, intervalle, ncoul, ncontour, level_z2d, colnumb
88
89      end
90      else: begin
91         ras = report('Le numero de label demande n''existe pas')
92      end
93   ENDCASE
94   if keyword_set(strictfill) then begin
95      ncontour = ncontour+1
96      level_z2d = [level_z2d, max]
97      colnumb = [colnumb, ncoul-1]
98   endif
99   return
100end
Note: See TracBrowser for help on using the repository browser.