source: trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro

Last change on this file 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: 22.6 KB
Line 
1;+
2;
3; @file_comments
4; Trace vertical graphs.
5;
6; @categories
7; Graphics
8;
9; @param TAB
10; The field whose we want to make a vertical cut can be 2 kind of thing:
11; 1) An 2d or 3d array.
12;    If the field is 2d, indicate, with the keyword BOXZOOM, geographic delineations of the boxzoom.
13;    If the field is 3d, we extract the section on we average possibly before to do the plot.
14; 2) a structure respecting all criterions specified by <pro>litchamp</pro>.
15;    The array contained in the structure must be 2 or 3d (See case 1)
16;
17; @param GIVENTYPE
18;
19; @param GIVENMIN {required}
20; valeur minimum que l'on veut prendre en compte dans le trace
21; des contours. Par defaut on prend le min de tab1 (sur les pts mer)
22;
23; @param GIVENMAX {required}
24; valeur maximum que l'on veut prendre en compte dans le trace
25; des contours. Par defaut on prend le max de tab1 (sur les pts mer)
26;
27; @keyword BOXZOOM
28; Vector indicating the geographic zone on which we want to cut the map.
29;  If BOXZOOM has :
30; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]]
31; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]]
32; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])]
33; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]]
34; 6 elements: The extraction is made on Boxzoom
35;
36; Where lon1, lon2,lat1,lat2 are global variables defined at the last
37; <pro>domdef</pro> !
38;
39; @keyword CONTINTERVALLE
40; When CONTOUR is activated, it is the value between 2 isolines
41; traced by a trait. So it can be different from the one specified by INTERVALLE which,
42; in this case, does not control colored isolines in color anymore. If there is noone
43; specified min, we choose a contour min which goes well with the specified interval!
44; If this keyword is not specified, we trace 20 isolines from the min to the max.
45;
46; @keyword CONTLABEL {type=integer}
47; When CONTOUR is activated, if n
48; is different of 0, choose the label type corresponding to n cases for
49; the traced by a traitisolines. To specify the type of label of the
50; colored contour, use LABEL
51;
52; @keyword CONTMAX {default=max of the keyword CONTOUR (on ocean points)}
53; When CONTOUR is activated, max value we want to consider in the isoline
54; traced by a trait's line.
55;
56; @keyword CONTMIN {default=min of the keyword CONTOUR (on ocean points)}
57; When CONTOUR is activated, min value we want to consider in the isoline
58; traced by a trait's line.
59;
60; @keyword CONTNLEVEL {default=20}
61; When  CONTOUR is activated, it is the number of contours
62; traced by a trait for drawing (active if
63; CONTLABEL=0).
64;
65; @keyword CONTOUR
66; If we want to trace contours of a different field than the one
67; whose we have the colored drawing (by example E-P in color and QSR in contours).
68; It must be a field respecting same characteristics than the argument number one of plt.
69;
70; @keyword ENDPOINTS
71; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities
72; of these ones are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are
73; coordinates.
74;
75; @keyword INTERVALLE
76; Value of an interval between two isolines. If there is none specified min,
77; we choose a min contour which goes well with the specified interval!. If this keyword is not
78; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated,
79; INTERVALLE only specify the interval between 2 colored isolines. To specify the interval
80; between 2 isolines traced by a trait, use CONTINTERVALLE.
81;
82; @keyword INV
83; Invert the color vector used to color the graph
84;               (without use the black, the white and the used palette)
85;
86; @keyword ZRATIO {default=2./3}
87; When the drawing has a zoomed part, it is the size ratio between the zoomed
88; part, hz (zoom height), and the whole drawing, ht (total height).
89;
90; @keyword LABEL {default=0}{type=integer}
91; It choose the label's type corresponding to cases in <pro>label</pro>
92; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines.
93; For these ones traced by a trait, use CONTLABEL.
94;
95; @keyword MASKFILL
96; set to 0 to avoid to fill the masked values
97;
98; @keyword MAXIN
99; to specify the max value we want to plot with a keyword instead of with the
100; input parameter max. If max is defined by both, parameter and keyword, the
101; keyword is retained.
102;
103; @keyword MININ
104; to specify the min value we want to plot with a keyword instead of with the
105; input parameter min. If min is defined by both, parameter and keyword, the
106; keyword is retained.
107;
108; @keyword NLEVEL {default=20}
109; Number of contours to draw. active if
110; LABEL=0 or is not specified.
111;
112; @keyword NOFILL
113; To make just isolines with no filling
114;
115; @keyword NOMASK
116; activate to suppress the use of the land-sea mask when plotting the field
117;
118; @keyword NO_PARTIALSTEP
119; activate to suppress the use of partial steps (force key_partialstep = 0 within pltz)
120;
121; @keyword NOTRI
122; To force not to use the triangulation. Beware, in this case, the
123; drawing only works if the grid is undeformed (It means that each point of a longitude
124; give one latitude and each point of a latitude give one longitude) except if we use
125; the keyword CELL_FILL=2.
126; Comment: if the field contain points !values.f_nan, then we even do a triangulation.
127;
128; @keyword MASKDTA
129; 2d array defining the mask that must be applied to the data instead
130; of the default mask which is defined according to the grid (t/u/v/f mask)
131;
132; @keyword OVERPLOT
133; To make a plot over an other one.
134; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword
135; does not the caption and/or the color bar.
136;
137; @keyword SIN
138; Activate this keyword if we want the x axis to be traced in sinus of the
139; latitude when we make a drawing f(y)
140;
141; @keyword STRICTFILL
142; Activate this keyword to that the filling of contours be
143; precisely done between the min and the max specified. Values inferior/superior at the
144; specified min/max are not filled. Note that max values a considered
145; as missing values so cells containing one or more corners with
146; values above max will have no contours drawn through them.
147;
148; @keyword STYLE {default=style=0}
149; Contour's style to adopt to draw isolines. See <pro>style</pro> for more informations
150;
151; @keyword WDEPTH
152; To specify that the field is at W depth instead of T
153; depth (automatically activated if vargrid eq 'W')
154;
155; @keyword XZ
156; Force to make a cut following xz
157;
158; @keyword YZ
159; Force to make a cut following yz
160;
161; @keyword ZOOM  {default=200m or max depth if it is inferior at 200m}
162; Depth where i can make our maximum zoom.
163;
164; @uses
165; <pro>common</pro>
166;
167; @history
168;  Sebastien Masson (smasson\@lodyc.jussieu.fr)
169; 7/1999
170; Sebastien Masson 08/02/2000 checkfield and
171; notri keyword.
172;
173; @version
174; $Id$
175;
176; @todo
177; seb definition of parameters L.215 à 221
178;
179;-
180PRO pltz, tab, giventype, givenmin, givenmax $
181        , BOXZOOM=boxzoom, CONTOUR=contour $
182        , ENDPOINTS=endpoints, INTERVALLE=intervalle, INV=inv $
183        , ZRATIO=zratio $
184        , CONTINTERVALLE=contintervalle, LABEL=label, CONTLABEL=contlabel $
185        , STYLE=style, CONTMAX=contmax, SIN=sin, TYPEIN=typein $
186        , CONTMIN=contmin, NLEVEL=nlevel, CONTNLEVEL=contnlevel $
187        , NOFILL=nofill, NOMASK = nomask, NO_PARTIALSTEP = no_partialstep, NOTRI=notri $
188        , USETRI = usetri, FILLXDIR = fillxdir $
189        , ZOOM=zoom, XZ=xz, YZ=yz, MININ=minin, MAXIN=maxin $
190        , STRICTFILL=strictfill, OVERPLOT=overplot $
191        , WDEPTH=wdepth, REALSECTION=realsection, MASKFILL=maskfill, MASKDTA = maskdta $
192        , _EXTRA=ex
193;
194  compile_opt idl2, strictarrsubs
195;
196@cm_4mesh
197@cm_4data
198@cm_4ps
199  IF NOT keyword_set(key_forgetold) THEN BEGIN
200@updatenew
201@updatekwd
202  ENDIF
203;--------------------------------------------------------------
204  tempsun = systime(1)          ; For key_performance
205;------------------------------------------------------------
206;--------------------------------------------------------------
207; 1st part: initialization small calculations...
208;--------------------------------------------------------------
209; Comment: we do not reinitialize when we call back plt in loop to use contour.
210  if n_elements(contour) ne 4 AND NOT keyword_set(overplot) then reinitplt
211;
212  if n_elements(contour) ne 4 THEN saveboxparam, 'boxparam4pltz.dat'
213  key_partialstep = keyword_set(key_partialstep) * (1b - keyword_set(no_partialstep))
214;--------------------------------------------------------------
215;  Reading of the field.
216;--------------------------------------------------------------
217  if n_elements(giventype) NE 0 then type = giventype
218  if n_elements(givenmin) NE 0 then min = givenmin
219  if n_elements(givenmax) NE 0 then max = givenmax
220  if n_elements(minin) NE 0 then min = minin
221  if n_elements(maxin) NE 0 then max = maxin
222  if n_elements(realsection) EQ 0 then realsection = 1
223  IF n_elements(usetri) EQ 0 THEN BEGIN
224    IF n_elements(notri) NE 0 THEN usetri = 2-notri ELSE usetri = 1
225  ENDIF
226; no need of triangulation
227  IF usetri EQ 1 AND keyword_set(realsection) THEN usetri = 0
228; did we specify the type ?
229  if keyword_set(typein) then BEGIN
230    if size(type, /type) NE 7 AND size(type, /type) NE 0 then begin
231      if n_elements(min) NE 0 then max = min
232      min = type
233    endif
234    type = typein
235  ENDIF
236;
237  checktypeminmax, 'pltz', TYPE = type, MIN = min, MAX = max $
238    , XZ = xz, YZ = yz, ENDPOINTS = endpoints, _extra = ex
239;
240  if keyword_set(endpoints) then begin
241    section, tab, z2d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $
242    , BOXZOOM = boxzoom, DIREC = direc, WDEPTH = wdepth, _extra = ex
243    if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN
244      restoreboxparam, 'boxparam4pltz.dat'
245      return
246    ENDIF
247    nx = n_elements(glam)
248    ny = nx
249    if strupcase(vargrid) EQ 'W' then begin
250      gdep = gdepw[firstzw:lastzw]
251      nz = nzw
252    ENDIF ELSE BEGIN
253      gdep = gdept[firstzt:lastzt]
254      nz = nzt
255    ENDELSE
256    mask = z2d LE valmask/10.
257  ENDIF ELSE BEGIN
258    z2d = checkfield(tab, 'pltz', TYPE = type, BOXZOOM = boxzoom $
259                     , DIREC = direc, WDEPTH = wdepth, _extra = ex)
260    if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN
261      restoreboxparam, 'boxparam4pltz.dat'
262      return
263    ENDIF
264    IF realsection EQ 1 THEN grille, mask, glam, gphi, gdep, nx, ny, nz, type = type, WDEPTH = wdepth $
265    ELSE grille, mask, glam, gphi, gdep, nx, ny, nz, WDEPTH = wdepth
266  ENDELSE
267  IF size(gdep, /n_dimensions) EQ 2 THEN usetri = 2
268;---------------------------------------------------------------
269  profmax = !y.range[0]
270  profmin = !y.range[1]
271  if not keyword_set(zoom) then zoom = 200
272  zoom = zoom[0]
273  IF zoom LT profmin THEN zoom = profmax
274  if zoom GE vert2 then zoom = profmax
275; construction of the mask and of the axis
276  axis4pltz, type, mask, glam, gphi, gdep, XXAXIS = xxaxis, ZZAXIS = zzaxis, SIN = sin, ZRATIO = zratio, ZOOM = zoom, PROFMAX = profmax, PROFMIN = profmin, _extra = ex
277; to draw from bottom to top (avoid using cell_fill)
278  z2d = reverse(z2d, 2)
279  szmsk = size(mask, /dimensions)
280  IF keyword_set(nomask) THEN mask = replicate(1b, szmsk[0], szmsk[1])
281  IF keyword_set(maskdta) THEN mask = byte(fitintobox(maskdta))
282;-----------------------------------------------------------------------------
283; Determination of the mi:min and of the ma:max of z2d in the same way
284; as max: max and min: min for the drawing.
285;-----------------------------------------------------------------------------
286  nan = total(finite(z2d, /nan)) < 1
287; Do we need to do an autoscale ???
288  autoscale = testvar(var = min) EQ testvar(var = max) AND NOT keyword_set(intervalle)
289  determineminmax, z2d, mask, mi, ma, MININ = min, MAXIN = max, nan = nan, INTERVALLE = intervalle, _extra = ex
290  if n_elements(z2d) EQ 1 AND z2d[0] EQ -1 THEN GOTO, sortie
291; We do an autoscale if needed.
292  if autoscale then autoscale, min, max, intervalle
293;--------------------------------------------------------------
294;--------------------------------------------------------------
295; 2nd part: drawing
296;--------------------------------------------------------------
297;--------------------------------------------------------------
298  if n_elements(contour) NE 4 AND NOT keyword_set(overplot) THEN $
299    placedessin, 'pltz', posfenetre, posbar, contour = contour, endpoints = endpoints $
300    , direc = direc, _extra = ex
301;------------------------------------------------------------
302;--------------------------------------------------------------
303; choice of labels
304;-----------------------------------------------------------
305  if keyword_set(intervalle) AND NOT keyword_set(label) then label = 1
306  if keyword_set(label) eq 0 then cas = 0 else cas = label
307  label, cas, min, max, ncontour, level_z2d, colnumb, NLEVEL = nlevel $
308         , INTERVALLE = intervalle, strictfill = strictfill
309;--------------------------------------------------------------
310; choice of style
311;-----------------------------------------------------------
312  if not keyword_set(style) then style = 0
313  style, style, level_z2d, linestyle, thick
314  if keyword_set(inv) then colnumb = reverse(colnumb)
315;-----------------------------------------------------------
316;   definition of axes
317;----------------------------------------------------------
318  if NOT keyword_set(overplot) THEN axe, type, SIN = sin, _EXTRA = ex
319  !y.range = [-1, 0]
320;--------------------------------------------------------------
321; extrapolation of data on lands and specifying of the min/max value
322;--------------------------------------------------------------
323; define masknan
324  if keyword_set(nan) then BEGIN
325    masknan = finite(z2d)
326    IF NOT keyword_set(nofill) THEN z2d[where(masknan EQ 0)] = max
327  ENDIF ELSE masknan = 1
328  IF keyword_set(strictfill) THEN BEGIN
329    tmp = z2d ge max
330    IF total(tmp GE 1) THEN BEGIN
331      tmp = 1b - byte(extrapolate(tmp, tmp, 1))
332      key_save = key_periodic & key_periodic = 0
333      trifield = triangule(temporary(tmp)*mask, coinmonte = coinmontemask $
334                           , coindescend = coindescendmask, keep_cont = 0)
335      key_periodic = key_save
336    ENDIF
337  ENDIF
338  IF n_elements(fillxdir) EQ 0  THEN fillxdir = 1
339  IF keyword_set(fillxdir) THEN BEGIN
340; filling the mask values only in the x direction.
341    z2d = remplit(z2d, nite = nx*(1-(n_elements(maskfill) NE 0)) $
342                  , mask = mask*masknan, /basique $
343                  , /fillxdir, _extra = ex)
344; if some lines contains no field (the bottom line for ex) it must be
345; also filled with 8 neighbors method
346    IF (where(total(mask*masknan, 1) EQ 0))[0] NE -1 THEN $
347      z2d = remplit(z2d, nite = 1-(n_elements(maskfill) NE 0) $
348                    , mask = z2d LT valmask/10, /basique, _extra = ex)
349  ENDIF ELSE BEGIN
350; filling the mask values with 8 neighbors
351    z2d = remplit(z2d, nite = (1+(vargrid NE 'T')+keyword_set(nan)) $
352                  *(1-(n_elements(maskfill) NE 0)), mask = mask*masknan $
353                  , /basique, _extra = ex)
354  ENDELSE
355  if keyword_set(strictfill) EQ 0 AND n_elements(maskfill) EQ 0 $
356    then z2d = min > z2d <  max
357  if n_elements(maskfill) NE 0 then BEGIN
358    z2d = z2d*mask*masknan
359    if maskfill NE 0 then z2d = temporary(z2d) + maskfill*(1b-mask*masknan)
360  ENDIF
361;----------------------------------------------------------
362; check the mask and the triangulation according to the grid type and
363; nan values. find the coordinates of the mask
364;----------------------------------------------------------
365;   if (where(mask EQ 0))[0] EQ -1 AND NOT keyword_set(nan) then notri = 1
366;   if keyword_set(notri) then trifield = -1 $
367;   ELSE trifield = triangule(mask,/basic)
368  if n_elements(key_save) EQ 0 AND ((usetri GE 1 AND (vargrid EQ 'T' OR vargrid EQ 'W')) $
369                                      OR (usetri EQ 2 AND (vargrid NE 'T' AND vargrid NE 'W'))) THEN $
370                                         trifield = triangule(mask, /basic)
371;
372  IF NOT keyword_set(endpoints)  THEN BEGIN
373    if keyword_set(nan) then trinan = triangule(masknan, /basic, coinmonte = coinmontenan, coindescend = coindescendnan)
374    maskorg = mask
375    decoupeterre, mask, glammsk, gphimsk, gdepmsk, type = type, WDEPTH = wdepth, REALSECTION = realsection, MASKDTA = maskdta
376    axis4pltz, type, mask, glammsk, gphimsk, gdepmsk, XXAXIS = xmask, ZZAXIS = zmask, SIN = sin, ZRATIO = zratio, ZOOM = zoom, PROFMAX = profmax, PROFMIN = profmin, _extra = ex
377    szmsk = size(mask, /dimensions)
378    IF keyword_set(nomask) THEN mask = replicate(1b, szmsk[0], szmsk[1])
379  ENDIF ELSE BEGIN
380    xmask = xxaxis
381    zmask = zzaxis
382  ENDELSE
383;
384  if (usetri GE 1 AND (vargrid NE 'T' AND vargrid NE 'W')) THEN BEGIN
385    IF keyword_set(realsection) THEN trimsk = triangule(mask, /basic) $
386    ELSE trimsk = triangule(mask, /basic, coinmonte = coinmontemask $
387                            , coindescend = coindescendmask)
388  ENDIF
389;------------------------------------------------------------
390; dessin en lui meme
391;------------------------------------------------------------
392  IF n_elements(romszinfos) EQ 1 THEN BEGIN
393; add one line at bottom to have nicer plot (colors go until the ocean bottom)
394    IF n_elements(romszinfos.h) NE 1 THEN BEGIN
395      CASE type OF
396        'xz':romsh = moyenne(romszinfos.h, 'y')
397        'yz':romsh = moyenne(romszinfos.h, 'x')
398      ENDCASE
399      IF nzt EQ jpk THEN BEGIN
400        z2d = [[z2d], [z2d[*, jpk-1]]]
401        zzaxis = [[zzaxis], [romsh]]
402      ENDIF
403    ENDIF
404  ENDIF
405  pltbase, z2d, xxaxis, zzaxis, mask, xmask, zmask $
406    , level_z2d, colnumb, overplot = overplot $
407    , contour = contour, trichamp = trifield, trimsk = trimsk  $
408    , c_linestyle = linestyle $
409    , c_labels = 1-(indgen(n_elements(level_z2d)) MOD 2) $
410    , c_thick = thick, unsur2 = unsur2, NOFILL = nofill $
411    , maskorg = maskorg, masknan = masknan, trinan = trinan $
412    , coinmontenan = coinmontenan, coindescendnan = coindescendnan $
413    , coinmontemask = coinmontemask, coindescendmask = coindescendmask $
414    , REALSECTION = realsection, USETRI = usetri, _extra = ex
415;------------------------------------------------------------
416; recall of pltz in loop when contour is activated
417;------------------------------------------------------------
418  if n_elements(contour) eq 4 then BEGIN ; It is the second time I pass in pltt
419    contour = {mietma:[mi, ma], unit:varunit, inter:intervalle} ; I send back the min, the max and the unity
420    return
421  endif
422  if keyword_set(contour) THEN BEGIN
423    pourlegende = [1, 1, 1, 1]
424    oldattributs = saveatt()
425    oldcolnumb = colnumb
426    pltz, contour, contmin, contmax, CONTOUR = pourlegende, ZRATIO = zratio $
427      , INTERVALLE = contintervalle, LABEL = contlabel, STYLE = style, /noerase  $
428      , NLEVEL = contnlevel, ZOOM = zoom, BOXZOOM = boxzoom, ENDPOINTS = endpoints $
429      , STRICTFILL = strictfill, REALSECTION = realsection, MASKFILL = maskfill $
430      , USETRI = usetri, _extra = ex
431    restoreatt, oldattributs
432    colnumb = oldcolnumb
433  ENDIF
434;------------------------------------------------------------
435;------------------------------------------------------------
436; 3rd part: drawing of the frame, caption, colorbar...
437;------------------------------------------------------------
438  if keyword_set(overplot) then BEGIN
439    !y.range =  [zoom, profmin] ; We get back on physic coordinates
440    plot, [0], [0], /nodata, /noerase, title = '', subtitle = '', xstyle = 5, ystyle = 5
441    GOTO, fini
442  endif
443;------------------------------------------------------------
444; Caption + display of them
445;------------------------------------------------------------
446  legende, mi, ma, type, CONTOUR = pourlegende, INTERVALLE = intervalle, DIREC = direc, endpoints = endpoints, _EXTRA = ex
447  if type eq 'yz' then xaxe = 'lataxe' else xaxe = 'lonaxe'
448  if keyword_set(sin) OR NOT key_onearth then xaxe = ''
449; Frame applied by default
450  plot, [xxaxis[0], xxaxis[n_elements(xxaxis)-1]], [-zratio, -zratio], /noerase $
451    , xstyle = 1+4*(keyword_set(endpoints) AND ((type EQ 'xz' AND lat1 NE lat2) OR (type EQ 'yz' AND lon1 NE lon2))) $
452    , xtickformat = xaxe, _extra = ex
453; Add of an axis in the case of we use endpoints
454  if keyword_set(endpoints) then addaxe, endpoints, type, posfenetre, _EXTRA = ex
455;------------------------------------------------------------
456; Y axis in 1 or 2 part
457;------------------------------------------------------------
458  if n_elements(ex) NE 0 then BEGIN
459; To do not put title anymore
460    if (where(tag_names(ex) EQ 'TITLE'))[0] NE -1 then ex.TITLE = ' '
461; To do not put subtitle anymore
462    if (where(tag_names(ex) EQ 'SUBTITLE'))[0] NE -1 then ex.SUBTITLE = ' '
463; To have just one ytitle
464    if (where(tag_names(ex) EQ 'YTITLE'))[0] NE -1 then BEGIN
465      ytitle = ex.YTITLE
466      ex.YTITLE = ' '
467    endif
468  ENDIF
469  htotal = posfenetre[3]-posfenetre[1]
470  hzoom = 1.*zratio*htotal
471  if zoom LT profmax then $
472    plot, [0], [0], /nodata, /noerase, ystyle = 1, yrange = [profmax, zoom+0.001] $
473    , position = posfenetre+[0, 0, 0, -hzoom], _extra = ex, title = '', subtitle = '', ytitle = ''
474;
475  !y.range =  [zoom, profmin]   ; We get back in physic coordinates!
476  plot, [0], [0], /nodata, /noerase, ystyle = 1, _extra = ex $
477    , title = '', subtitle = '', ytitle = '', position = posfenetre+[0, htotal-hzoom, 0, 0]
478;------------------------------------------------------------
479; to write the ytitle...
480;------------------------------------------------------------
481  IF n_elements(ex) NE 0 THEN BEGIN
482    if (where(tag_names(ex) EQ 'YTICKS'))[0] NE -1 then ex.YTICKS = 1
483    if (where(tag_names(ex) EQ 'YTICKNAME'))[0] NE -1 then ex.YTICKNAME = [' ', ' ']
484    if (where(tag_names(ex) EQ 'YTITLE'))[0] NE -1 then ex.YTITLE = ytitle+'!C '
485  ENDIF
486  !y.range =  [profmax, profmin]   ; We get back in physic coordinates!
487  plot, [0], [0], /nodata, /noerase, xstyle = 5, ystyle = 9 $
488        , title = '', subtitle = '', xtitle = '', position = posfenetre $
489        , yticks = 1, ytickname = [' ', ' '], ytitle = !y.title+'!C ', ythick = 0.01, _extra = ex
490;------------------------------------------------------------
491; colorbar
492;------------------------------------------------------------
493  colnumb = colnumb[0:ncontour-1-keyword_set(strictfill)]
494  barrecouleur, colnumb, min,  max, (ncontour-keyword_set(strictfill))/2 $
495                , position = posbar, _extra = ex
496;------------------------------------------------------------
497;------------------------------------------------------------
498; 4th part: possible print
499;------------------------------------------------------------
500;------------------------------------------------------------
501fini:
502  terminedessin, _extra = ex
503;------------------------------------------------------------
504;------------------------------------------------------------
505;------------------------------------------------------------
506;------------------------------------------------------------
507sortie:
508  restoreboxparam, 'boxparam4pltz.dat'
509;
510  if keyword_set(key_performance) NE 0 THEN print, 'temps pltz', systime(1)-tempsun
511  return
512end
Note: See TracBrowser for help on using the repository browser.