source: trunk/ToBeReviewed/PLOTS/DESSINE/scontour.pro @ 35

Last change on this file since 35 was 35, checked in by pinsard, 18 years ago

upgrade of PLOTS/DESSINE according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/ : files

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 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@common
44; 1) je reinitialise l''environnememt graphique (les variables !x, !y et !p):
45  if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex
46; 2) je place le dessin a l'ecran comme sur le postcript
47; if ex contains norease and c_orientation keywords we force ex.noerase = 0
48  IF chkstru(ex, 'overplot') EQ 0 THEN placedessin, 'autre', _extra = ex
49; fiddle when noerase is used with c_orentation...
50; call contour with /nodata to get the graphic envoronment, then force
51; noerase = 0 and overplot = 1
52  IF size(ex, /type) EQ 8 THEN BEGIN
53; check if noerase is used with c_orentation
54    alltags = strlowcase(tag_names(ex))
55    dummy = where(alltags EQ 'noerase', count1)
56    dummy = where(alltags EQ 'c_orientation', count2)
57    IF count1*count2 NE 0 THEN BEGIN
58      case n_params() OF
59        1:contour, x, /nodata, _EXTRA = ex
60        2:contour, x, y, /nodata, _EXTRA = ex
61        3:contour, x, y, z, /nodata, _EXTRA = ex
62      endcase
63      ex.noerase = 0
64      ex = get_extra(/overplot, _extra = ex)
65      noerase_orientation = 1
66    ENDIF
67  ENDIF
68; 3) je fais mon joli dessin
69  case n_params() OF
70    1:contour, x, xstyle = 1, ystyle = 1, _EXTRA = ex
71    2:contour, x, y, xstyle = 1, ystyle = 1, _EXTRA = ex
72    3:contour, x, y, z, xstyle = 1, ystyle = 1, _EXTRA = ex
73  ENDCASE
74; fiddle when noerase is used with c_orentation... draw the contour axis
75  IF keyword_set(noerase_orientation)  THEN BEGIN
76    ex.noerase = 1
77    ex.overplot = 0
78    case n_params() OF
79      1:contour, x, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
80      2:contour, x, y, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
81      3:contour, x, y, z, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
82    ENDCASE
83  ENDIF
84; 4) je termine le dessin
85  terminedessin, _extra = ex
86
87  return
88end
Note: See TracBrowser for help on using the repository browser.