source: trunk/PLOTS/reinitplt.pro @ 2

Last change on this file since 2 was 2, checked in by opalod, 22 years ago

Initial revision

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