;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; ; @file_comments ; This procedure will reinitialise all or a selection ; ofthe system plot variables ; ; @categories ; Utilities ; ; ; @keyword X ; clear the appropriate variable ; ; @keyword Y ; clear the appropriate variable ; ; @keyword Z ; clear the appropriate variable ; ; @keyword P ; clear the appropriate variable ; ; @keyword ALL ; Clear all, this is equivalent to /x,/y,/z,/p ; ; @keyword INVERT ; Invert the logic. Clear all unselected variables. ; Therefore "clearplt,/all,/invert" does nothing. ; ; @uses ; common.pro ; ; @restrictions ; The sytem plot variables are changed. ; ; @history ; Written by: Trevor Harris, Physics Dept., University of Adelaide, ; July, 1990. ; ; Sebastien Masson 7/5/98 ; ; @version ; $Id$ ; ;- ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ pro reinitplt, all=all,x=x,y=y,z=z,p=p, invert=invert ;------------------------------------------------------------ ; compile_opt idl2, strictarrsubs ; clearx = 0 cleary = 0 clearz = 0 clearp = 0 if (keyword_set(x)) then clearx = 1 if (keyword_set(y)) then cleary = 1 if (keyword_set(z)) then clearz = 1 if (keyword_set(p)) then clearp = 1 if (keyword_set(all)) $ or (not keyword_set(x) and not keyword_set(y) and $ not keyword_set(z) and not keyword_set(p)) then begin clearx = 1 cleary = 1 clearz = 1 clearp = 1 endif if (keyword_set(invert)) then begin clearx = not clearx cleary = not cleary clearz = not clearz clearp = not clearp endif if (clearx) then begin !x.charsize=0 !x.GRIDSTYLE=0 !X.MARGIN=[10,3] !X.MINOR=0 !X.OMARGIN=[0,0] !x.region=0 !X.RANGE=0 !x.STYLE=5 ; !x.tick=1 !x.TICKFORMAT='' !x.TICKLEN=0 !x.tickname='' !x.ticks=0 !X.TICKV[0]=!X.TICKV[1] !x.title='' !x.TYPE=0 endif if (cleary) then begin !y.charsize=0 !y.GRIDSTYLE=0 !Y.MARGIN=[10,3] !Y.MINOR=0 !Y.OMARGIN=[0,0] !y.region=0 !Y.RANGE=0 !y.STYLE=5 ; !y.tick=1 !y.TICKFORMAT='' !y.TICKLEN=0 !y.tickname='' !y.ticks=0 !Y.TICKV[0]=!Y.TICKV[1] !y.title='' !y.TYPE=0 endif if (clearz) then begin !z.charsize=0 !z.GRIDSTYLE=0 !Z.MARGIN=[10,3] !Z.MINOR=0 !Z.OMARGIN=[0,0] !z.region=0 !Z.RANGE=0 !z.STYLE=1 ; !z.tick=1 !z.TICKFORMAT='' !z.TICKLEN=0 !z.tickname='' !z.ticks=0 !Z.TICKV[0]=!Z.TICKV[1] !z.title='' !z.TYPE=0 endif if (clearp) then begin !p.BACKGROUND=(!d.n_colors-1) < 255 !p.CHARSIZE=1. !p.CHARTHICK=0 !p.LINESTYLE=0 !p.MULTI=replicate(0,5) !p.NOERASE=0 !p.POSITION=0 !p.region=0 !p.title='' !p.subtitle='' !p.ticklen=0.02 !p.thick=0.1 !p.color=0 endif return end