;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; ; @file_comments ; Choose the way to trace isolines. ; ; @categories ; Graphics ; ; @param LABSTYLE {in}{required} ; Number to which the style of drawing choosen refer to. ; ; @param LEVEL_Z2D {in}{required} ; Vector containing values of isolignes to be traced. ; ; @param LINESTYLE {out} ; Vector used to define the isocontour's style ; Comment: remenber: ; Index Linestyle ; 0 Solid ; 1 Dotted ; 2 Dashed ; 3 Dash Dot ; 4 Dash Dot Dot Dot ; 5 Long Dashes ; ; @param THICK {out} ; Vector defining the thick of the isoline. ; ; @history ; Sebastien Masson (smasson\@lodyc.jussieu.fr) ; ; @version ; $Id$ ; ;- ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ pro style,labstyle,level_z2d,linestyle,thick ; compile_opt idl2, strictarrsubs ; case labstyle of 0: begin ;series: Two thin continuous lines, one boldface continuous line thick=[1,1,2] linestyle=[0] return end 1: begin ;series: Before the middle of levels: thin dash. Then thin continuous trait. ; If the middle of the drawing is drawn, it is in boldface continuous trait. impair=n_elements(level_z2d)-2*fix(n_elements(level_z2d)/2) a=replicate(0,fix(n_elements(level_z2d)/2)) b=replicate(1,fix(n_elements(level_z2d)/2)) c=replicate(2,fix(n_elements(level_z2d)/2)) if impair then begin thick=[b,2,b] linestyle=[c,0,a] endif else begin thick=[0] linestyle=[c,a] endelse return end 2: begin ;series: Before the sill (defined by answering to a question): thin dash. ; Then thin continuous trait. If the sill is drawn, it is in boldface continuous trait. seuil=xquestion('Quelle est la limite tirets/trait continu? ','0') seuil = float(seuil) rien=where(level_z2d lt seuil,n) a=replicate(0,n_elements(level_z2d)-n) c=replicate(2,n) if seuil eq level_z2d[n] then begin thick=[replicate(1,n),2,replicate(1,n_elements(level_z2d)-1-n)] linestyle=[c,a] endif else begin thick=[0] linestyle=[c,a] endelse return end 3: begin n = n_elements(level_z2d) seuil = level_z2d[1+n/2] thick = intarr(n) thick[indgen(n/4)*4] = 1 thick[indgen(n/4)*4+1] = 1 thick[indgen(n/4)*4+2] = 2 thick[indgen(n/4)*4+3] = 1 linestyle = intarr(n) linestyle[indgen(n/4)*4] = 3 linestyle[indgen(n/4)*4+1] = 0 linestyle[indgen(n/4)*4+2] = 0 linestyle[indgen(n/4)*4+3] = 0 labels = intarr(n) labels[indgen(n/2)*2] = 1 labels[n/2] = 0 return end 4: begin ; Boldface continuous trait. seuil = 1.e-6 thick=replicate(.5, n_elements(level_z2d)) linestyle=[0] rien=where(abs(level_z2d)/max(abs(level_z2d)) LT seuil) if rien[0] NE -1 then thick[rien[0]] = 3 end else: begin ras = report('Le numero de labstyle demande n''existe pas') stop end endcase return end