pro clear_utplot
;+
; NAME:
;	CLEAR_UTPLOT
; PURPOSE:
;	Restores plotting structures !x and !y to their values prior to calls to
;	SET_UTPLOT or UTPLOT.. 
; CALLING SEQUENCE:
;	CLEAR_UTPLOT
; COMMON BLOCKS:
;       COMMON CLEARCOMMON,XOLD,YOLD,CLEARSET = holding area for previous
;	!x and !y structures if clearset=1
; RESTRICTIONS:
;	None.
; PROCEDURE:
;	Restores structures !x and !y and resets the common variable CLEARSET.  
;	Next call to SET_UTPLOT will again store !x and !y.
;	Call CLEAR_UTPLOT if execution stops in the middle of any UTPLOT 
;	package calls to clear plotting structures !x and !y.
; MODIFICATION HISTORY:
;	Written by Richard Schwartz for IDL Version 2   91/02/17
;	20-Aug-92 (MDM) Added clearing UTBASE, UTSTART and UTEND
;        1-Nov-92 (DMZ) Added check that xold and yold exist
;	17-Mar-93 (MDM) Set !quiet=0 instead of =1
;-
common clearcommon,xold,yold,clearset
COMMON UTCOMMON, UTBASE, UTSTART, UTEND, xst
;
on_error,2
!quiet=0
clearset=1 ; !variables can be saved again in set_utplot
if n_elements(xold) ne 0 then !x=xold
if n_elements(yold) ne 0 then !y=yold

utbase = 0	;MDM added 20-Aug-92
utstart = 0	;MDM added 20-Aug-92
utend = 0	;MDM added 20-Aug-92
;
return
end
