source: trunk/SRC/ToBeReviewed/PLOTS/reinitplt.pro @ 378

Last change on this file since 378 was 369, checked in by pinsard, 16 years ago

improvements of some headers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1;+
2;
3; @file_comments
4; This procedure will reinitialize all or a selection
5; of the system plot variables
6;
7; @categories
8; Utilities
9;
10; @keyword X
11; clear the appropriate variable
12;
13; @keyword Y
14; clear the appropriate variable
15;       
16; @keyword Z   
17; clear the appropriate variable
18;
19; @keyword P
20; clear the appropriate variable
21;               
22; @keyword ALL 
23; Clear all, this is equivalent to /x,/y,/z,/p
24;               
25; @keyword INVERT
26; Invert the logic. Clear all unselected variables.
27; Therefore "reinitplt,/all,/invert" does nothing.
28;
29; @uses
30; <pro>common</pro>
31;
32; @restrictions
33; The system plot variables are changed.
34;       
35; @history
36; Written by: Trevor Harris, Physics Dept., University of Adelaide,
37;               July, 1990.
38;
39; Sebastien Masson 7/5/98
40;
41; @version
42; $Id$
43;
44;-
45PRO reinitplt, ALL=all, X=x, Y=y, Z=z, P=p, INVERT=invert
46;
47  compile_opt idl2, strictarrsubs
48;
49        clearx = 0
50        cleary = 0
51        clearz = 0
52        clearp = 0
53        if (keyword_set(x)) then clearx = 1
54        if (keyword_set(y)) then cleary = 1
55        if (keyword_set(z)) then clearz = 1
56        if (keyword_set(p)) then clearp = 1
57        if (keyword_set(all)) $
58            or (not keyword_set(x) and not keyword_set(y) and $
59                not keyword_set(z) and not keyword_set(p)) then begin
60                clearx = 1
61                cleary = 1
62                clearz = 1
63                clearp = 1
64        endif
65
66        if (keyword_set(invert)) then begin
67                clearx = not clearx
68                cleary = not cleary
69                clearz = not clearz
70                clearp = not clearp
71        endif
72
73        if (clearx) then begin
74                !x.charsize=0
75                !x.GRIDSTYLE=0
76                !X.MARGIN=[10,3]
77                !X.MINOR=0
78                !X.OMARGIN=[0,0]
79                !x.region=0
80                !X.RANGE=0
81                !x.STYLE=5
82;                !x.tick=1
83                !x.TICKFORMAT=''
84                !x.TICKLEN=0
85                !x.tickname=''
86                !x.ticks=0
87                !X.TICKV[0]=!X.TICKV[1]
88                !x.title=''
89                !x.TYPE=0
90        endif
91        if (cleary) then begin
92                !y.charsize=0
93                !y.GRIDSTYLE=0
94                !Y.MARGIN=[10,3]
95                !Y.MINOR=0
96                !Y.OMARGIN=[0,0]
97                !y.region=0
98                !Y.RANGE=0
99                !y.STYLE=5
100;                !y.tick=1
101                !y.TICKFORMAT=''
102                !y.TICKLEN=0
103                !y.tickname=''
104                !y.ticks=0
105                !Y.TICKV[0]=!Y.TICKV[1]
106                !y.title=''
107                !y.TYPE=0
108        endif
109        if (clearz) then begin
110                !z.charsize=0
111                !z.GRIDSTYLE=0
112                !Z.MARGIN=[10,3]
113                !Z.MINOR=0
114                !Z.OMARGIN=[0,0]
115                !z.region=0
116                !Z.RANGE=0
117                !z.STYLE=1
118;                !z.tick=1
119                !z.TICKFORMAT=''
120                !z.TICKLEN=0
121                !z.tickname=''
122                !z.ticks=0
123                !Z.TICKV[0]=!Z.TICKV[1]
124                !z.title=''
125                !z.TYPE=0
126        endif
127        if (clearp) then begin
128                !p.BACKGROUND=(!d.n_colors-1) < 255
129                !p.CHARSIZE=1.         
130                !p.CHARTHICK=0 
131                !p.LINESTYLE=0         
132                !p.MULTI=replicate(0,5)         
133                !p.NOERASE=0           
134                !p.POSITION=0           
135                !p.region=0             
136                !p.title=''
137                !p.subtitle=''
138                !p.ticklen=0.02
139                !p.thick=0.1
140                !p.color=0
141        endif
142        return
143        end
144
145
146
147
148
149
Note: See TracBrowser for help on using the repository browser.