source: trunk/SRC/ToBeReviewed/PLOTS/DESSINE/scontour.pro @ 114

Last change on this file since 114 was 114, checked in by smasson, 18 years ago

new compilation options (compile_opt idl2, strictarrsubs) in each routine

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5; NAME:scontour (super contour)
6;
7; PURPOSE: meme chose que contour mais compatible avec l''ensemble de
8; l'environnement (common.pro est inclu)
9;
10; CATEGORY:dessine
11;
12; CALLING SEQUENCE: scontour, z [, x, y]
13;
14; INPUTS:cd IDL>?contour
15;
16; KEYWORD PARAMETERS:
17;
18;  meme que ceux de bar_plot avec en plus:
19;      NOREINITPLT: a actier si on ne veut pas que les variables
20;      d''environnemet !p, !x, !y, !z soient reinitialisees par la
21;      procedure reinitplt
22;
23; OUTPUTS:
24;
25; COMMON BLOCKS:common.pro
26;
27; SIDE EFFECTS:
28;
29; RESTRICTIONS:
30;
31; EXAMPLE:
32;      IDL> z = dist(100)
33;      IDL> scontour, z, nlevels=10,small=[1,2,1],xstyle=1,ystyle=1
34;      IDL> @ps
35;
36; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)
37;                      10/10/1999
38;-
39;------------------------------------------------------------
40;------------------------------------------------------------
41;------------------------------------------------------------
42PRO scontour, x, y, z, NOREINITPLT = noreinitplt, _EXTRA = ex
43;
44  compile_opt idl2, strictarrsubs
45;
46@common
47; 1) je reinitialise l''environnememt graphique (les variables !x, !y et !p):
48  if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex
49; 2) je place le dessin a l'ecran comme sur le postcript
50; if ex contains norease and c_orientation keywords we force ex.noerase = 0
51  IF chkstru(ex, 'overplot') EQ 0 THEN placedessin, 'autre', _extra = ex
52; fiddle when noerase is used with c_orentation...
53; call contour with /nodata to get the graphic envoronment, then force
54; noerase = 0 and overplot = 1
55  IF size(ex, /type) EQ 8 THEN BEGIN
56; check if noerase is used with c_orentation
57    alltags = strlowcase(tag_names(ex))
58    dummy = where(alltags EQ 'noerase', count1)
59    dummy = where(alltags EQ 'c_orientation', count2)
60    IF count1*count2 NE 0 THEN BEGIN
61      case n_params() OF
62        1:contour, x, /nodata, _EXTRA = ex
63        2:contour, x, y, /nodata, _EXTRA = ex
64        3:contour, x, y, z, /nodata, _EXTRA = ex
65      endcase
66      ex.noerase = 0
67      ex = get_extra(/overplot, _extra = ex)
68      noerase_orientation = 1
69    ENDIF
70  ENDIF
71; 3) je fais mon joli dessin
72  case n_params() OF
73    1:contour, x, xstyle = 1, ystyle = 1, _EXTRA = ex
74    2:contour, x, y, xstyle = 1, ystyle = 1, _EXTRA = ex
75    3:contour, x, y, z, xstyle = 1, ystyle = 1, _EXTRA = ex
76  ENDCASE
77; fiddle when noerase is used with c_orentation... draw the contour axis
78  IF keyword_set(noerase_orientation)  THEN BEGIN
79    ex.noerase = 1
80    ex.overplot = 0
81    case n_params() OF
82      1:contour, x, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
83      2:contour, x, y, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
84      3:contour, x, y, z, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
85    ENDCASE
86  ENDIF
87; 4) je termine le dessin
88  terminedessin, _extra = ex
89
90  return
91end
Note: See TracBrowser for help on using the repository browser.