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

Last change on this file since 142 was 142, checked in by navarro, 18 years ago

english and nicer header (2a)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5;
6; @File_comments
7; Same thing that contour but compatible with the whole environnement (common.pro inclued)
8;
9; @categories graphics
10;
11; INPUTS:cd IDL>?contour
12;
13; @keyword NOREINITPLT
14; We active it if we do not want environnement variables !p, !x, !y, !z
15; to be reinitilalizted by the procedure reinitplt
16;
17; @keyword _EXTRA
18; used to pass your keywords
19;
20; @uses
21; common.pro
22;
23; @examples
24;      IDL> z = dist(100)
25;      IDL> scontour, z, nlevels=10,small=[1,2,1],xstyle=1,ystyle=1
26;      IDL> \@ps
27;
28; @history Sebastien Masson (smasson@lodyc.jussieu.fr)
29;                      10/10/1999
30;
31; @version
32; $Id$
33;
34;-
35;------------------------------------------------------------
36;------------------------------------------------------------
37;------------------------------------------------------------
38PRO scontour, x, y, z, NOREINITPLT = noreinitplt, _EXTRA = ex
39;
40  compile_opt idl2, strictarrsubs
41;
42@common
43; 1) I reinitializate the graphic environment (variables !x, !y et !p):
44  if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex
45; 2) i put the drawing on the screen like on the postcript
46; if ex contains norease and c_orientation keywords we force ex.noerase = 0
47  IF chkstru(ex, 'overplot') EQ 0 THEN placedessin, 'autre', _extra = ex
48; fiddle when noerase is used with c_orentation...
49; call contour with /nodata to get the graphic environment, then force
50; noerase = 0 and overplot = 1
51  IF size(ex, /type) EQ 8 THEN BEGIN
52; check if noerase is used with c_orentation
53    alltags = strlowcase(tag_names(ex))
54    dummy = where(alltags EQ 'noerase', count1)
55    dummy = where(alltags EQ 'c_orientation', count2)
56    IF count1*count2 NE 0 THEN BEGIN
57      case n_params() OF
58        1:contour, x, /nodata, _EXTRA = ex
59        2:contour, x, y, /nodata, _EXTRA = ex
60        3:contour, x, y, z, /nodata, _EXTRA = ex
61      endcase
62      ex.noerase = 0
63      ex = get_extra(/overplot, _extra = ex)
64      noerase_orientation = 1
65    ENDIF
66  ENDIF
67; 3) je fais mon joli dessin
68  case n_params() OF
69    1:contour, x, xstyle = 1, ystyle = 1, _EXTRA = ex
70    2:contour, x, y, xstyle = 1, ystyle = 1, _EXTRA = ex
71    3:contour, x, y, z, xstyle = 1, ystyle = 1, _EXTRA = ex
72  ENDCASE
73; fiddle when noerase is used with c_orentation... draw the contour axis
74  IF keyword_set(noerase_orientation)  THEN BEGIN
75    ex.noerase = 1
76    ex.overplot = 0
77    case n_params() OF
78      1:contour, x, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
79      2:contour, x, y, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
80      3:contour, x, y, z, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
81    ENDCASE
82  ENDIF
83; 4) End of drawing
84  terminedessin, _extra = ex
85
86  return
87end
Note: See TracBrowser for help on using the repository browser.