[2] | 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 | ;------------------------------------------------------------ |
---|
| 41 | pro reinitplt, all=all,x=x,y=y,z=z,p=p, invert=invert |
---|
| 42 | ;------------------------------------------------------------ |
---|
[114] | 43 | ; |
---|
| 44 | compile_opt idl2, strictarrsubs |
---|
| 45 | ; |
---|
[2] | 46 | clearx = 0 |
---|
| 47 | cleary = 0 |
---|
| 48 | clearz = 0 |
---|
| 49 | clearp = 0 |
---|
| 50 | if (keyword_set(x)) then clearx = 1 |
---|
| 51 | if (keyword_set(y)) then cleary = 1 |
---|
| 52 | if (keyword_set(z)) then clearz = 1 |
---|
| 53 | if (keyword_set(p)) then clearp = 1 |
---|
| 54 | if (keyword_set(all)) $ |
---|
| 55 | or (not keyword_set(x) and not keyword_set(y) and $ |
---|
| 56 | not keyword_set(z) and not keyword_set(p)) then begin |
---|
| 57 | clearx = 1 |
---|
| 58 | cleary = 1 |
---|
| 59 | clearz = 1 |
---|
| 60 | clearp = 1 |
---|
| 61 | endif |
---|
| 62 | |
---|
| 63 | if (keyword_set(invert)) then begin |
---|
| 64 | clearx = not clearx |
---|
| 65 | cleary = not cleary |
---|
| 66 | clearz = not clearz |
---|
| 67 | clearp = not clearp |
---|
| 68 | endif |
---|
| 69 | |
---|
| 70 | if (clearx) then begin |
---|
| 71 | !x.charsize=0 |
---|
| 72 | !x.GRIDSTYLE=0 |
---|
| 73 | !X.MARGIN=[10,3] |
---|
| 74 | !X.MINOR=0 |
---|
| 75 | !X.OMARGIN=[0,0] |
---|
| 76 | !x.region=0 |
---|
| 77 | !X.RANGE=0 |
---|
| 78 | !x.STYLE=5 |
---|
| 79 | ; !x.tick=1 |
---|
| 80 | !x.TICKFORMAT='' |
---|
| 81 | !x.TICKLEN=0 |
---|
| 82 | !x.tickname='' |
---|
| 83 | !x.ticks=0 |
---|
| 84 | !X.TICKV[0]=!X.TICKV[1] |
---|
| 85 | !x.title='' |
---|
| 86 | !x.TYPE=0 |
---|
| 87 | endif |
---|
| 88 | if (cleary) then begin |
---|
| 89 | !y.charsize=0 |
---|
| 90 | !y.GRIDSTYLE=0 |
---|
| 91 | !Y.MARGIN=[10,3] |
---|
| 92 | !Y.MINOR=0 |
---|
| 93 | !Y.OMARGIN=[0,0] |
---|
| 94 | !y.region=0 |
---|
| 95 | !Y.RANGE=0 |
---|
| 96 | !y.STYLE=5 |
---|
| 97 | ; !y.tick=1 |
---|
| 98 | !y.TICKFORMAT='' |
---|
| 99 | !y.TICKLEN=0 |
---|
| 100 | !y.tickname='' |
---|
| 101 | !y.ticks=0 |
---|
| 102 | !Y.TICKV[0]=!Y.TICKV[1] |
---|
| 103 | !y.title='' |
---|
| 104 | !y.TYPE=0 |
---|
| 105 | endif |
---|
| 106 | if (clearz) then begin |
---|
| 107 | !z.charsize=0 |
---|
| 108 | !z.GRIDSTYLE=0 |
---|
| 109 | !Z.MARGIN=[10,3] |
---|
| 110 | !Z.MINOR=0 |
---|
| 111 | !Z.OMARGIN=[0,0] |
---|
| 112 | !z.region=0 |
---|
| 113 | !Z.RANGE=0 |
---|
| 114 | !z.STYLE=1 |
---|
| 115 | ; !z.tick=1 |
---|
| 116 | !z.TICKFORMAT='' |
---|
| 117 | !z.TICKLEN=0 |
---|
| 118 | !z.tickname='' |
---|
| 119 | !z.ticks=0 |
---|
| 120 | !Z.TICKV[0]=!Z.TICKV[1] |
---|
| 121 | !z.title='' |
---|
| 122 | !z.TYPE=0 |
---|
| 123 | endif |
---|
| 124 | if (clearp) then begin |
---|
| 125 | !p.BACKGROUND=(!d.n_colors-1) < 255 |
---|
| 126 | !p.CHARSIZE=1. |
---|
| 127 | !p.CHARTHICK=0 |
---|
| 128 | !p.LINESTYLE=0 |
---|
| 129 | !p.MULTI=replicate(0,5) |
---|
| 130 | !p.NOERASE=0 |
---|
| 131 | !p.POSITION=0 |
---|
| 132 | !p.region=0 |
---|
| 133 | !p.title='' |
---|
| 134 | !p.subtitle='' |
---|
| 135 | !p.ticklen=0.02 |
---|
| 136 | !p.thick=0.1 |
---|
| 137 | !p.color=0 |
---|
| 138 | endif |
---|
| 139 | return |
---|
| 140 | end |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | |
---|