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

Last change on this file since 296 was 296, checked in by pinsard, 17 years ago

typo

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