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