1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; |
---|
6 | ; @file_comments |
---|
7 | ; Same thing than plot but compatible with the whole environment (common.pro included) |
---|
8 | ; |
---|
9 | ; @categories |
---|
10 | ; Graphics |
---|
11 | ; |
---|
12 | ; @keyword NOREINITPLT |
---|
13 | ; We active it if we do not want environment variables !p, !x, !y, !z |
---|
14 | ; to be reinitilalizated by the procedure reinitplt |
---|
15 | ; |
---|
16 | ; @keyword _EXTRA |
---|
17 | ; used to pass your keywords |
---|
18 | ; |
---|
19 | ; @uses |
---|
20 | ; common.pro |
---|
21 | ; |
---|
22 | ; @restrictions |
---|
23 | ; If NOREINITPLT is not activated, all environment |
---|
24 | ; variables !p, !x, !y, !z are reinitializted by the procedure reinitplt |
---|
25 | ; |
---|
26 | ; @examples |
---|
27 | ; IDL> splot, indgen(10),ystyle=1,small=[1,2,1],/portrait |
---|
28 | ; IDL> splot, -indgen(10),ystyle=1,small=[1,2,2],/noerase |
---|
29 | ; IDL> \@ps |
---|
30 | ; |
---|
31 | ; @history |
---|
32 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
33 | ; 18/10/1999 |
---|
34 | ; |
---|
35 | ; @version |
---|
36 | ; $Id$ |
---|
37 | ; |
---|
38 | ;- |
---|
39 | ;------------------------------------------------------------ |
---|
40 | ;------------------------------------------------------------ |
---|
41 | ;------------------------------------------------------------ |
---|
42 | PRO splot, x, y, NOREINITPLT = noreinitplt, _EXTRA = ex |
---|
43 | ; |
---|
44 | compile_opt idl2, strictarrsubs |
---|
45 | ; |
---|
46 | @common |
---|
47 | ; 1) I reinitializate the graphic environment (les variables !x, !y et !p): |
---|
48 | if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex |
---|
49 | ; 2) i put the drawing on the screen like on the postcript |
---|
50 | placedessin, 'autre', _extra = ex |
---|
51 | ; 3) Drawing |
---|
52 | if n_elements(y) EQ 0 then plot, x, xstyle = 1, ystyle = 1, _EXTRA = ex $ |
---|
53 | ELSE plot, x, y, xstyle = 1, ystyle = 1, _EXTRA = ex |
---|
54 | ; 4) End of drawing |
---|
55 | terminedessin, _extra=ex |
---|
56 | ; |
---|
57 | return |
---|
58 | end |
---|