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

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

modification of headers : mainly blanks around = sign for keywords in declaration of function and pro

  • 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;-
32PRO scontour, x, y, z, NOREINITPLT=noreinitplt, _EXTRA=ex
33;
34  compile_opt idl2, strictarrsubs
35;
36@common
37; 1) I reinitialize the graphic environment (variables !x, !y and !p):
38  if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex
39; 2) i put the drawing on the screen like on the postscript
40; if ex contains norease and c_orientation keywords we force ex.noerase = 0
41  IF chkstru(ex, 'overplot') EQ 0 THEN placedessin, 'autre', _extra = ex
42; fiddle when noerase is used with c_orientation...
43; call contour with /nodata to get the graphic environment, then force
44; noerase = 0 and overplot = 1
45  IF size(ex, /type) EQ 8 THEN BEGIN
46; check if noerase is used with c_orientation
47    alltags = strlowcase(tag_names(ex))
48    dummy = where(alltags EQ 'noerase', count1)
49    dummy = where(alltags EQ 'c_orientation', count2)
50    IF count1*count2 NE 0 THEN BEGIN
51      case n_params() OF
52        1:contour, x, /nodata, _EXTRA = ex
53        2:contour, x, y, /nodata, _EXTRA = ex
54        3:contour, x, y, z, /nodata, _EXTRA = ex
55      endcase
56      ex.noerase = 0
57      ex = get_extra(/overplot, _extra = ex)
58      noerase_orientation = 1
59    ENDIF
60  ENDIF
61; 3) je fais mon joli dessin
62  case n_params() OF
63    1:contour, x, xstyle = 1, ystyle = 1, _EXTRA = ex
64    2:contour, x, y, xstyle = 1, ystyle = 1, _EXTRA = ex
65    3:contour, x, y, z, xstyle = 1, ystyle = 1, _EXTRA = ex
66  ENDCASE
67; fiddle when noerase is used with c_orientation... draw the contour axis
68  IF keyword_set(noerase_orientation)  THEN BEGIN
69    ex.noerase = 1
70    ex.overplot = 0
71    case n_params() OF
72      1:contour, x, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
73      2:contour, x, y, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
74      3:contour, x, y, z, xstyle = 1, ystyle = 1, /nodata, _EXTRA = ex
75    ENDCASE
76  ENDIF
77; 4) End of drawing
78  terminedessin, _extra = ex
79
80  return
81end
Note: See TracBrowser for help on using the repository browser.