
;       (16-aug-92)
pro plot_init,item,pos,noerase=noerase,clean=clean
;+
; NAME:
;       PLOT_INIT
; PURPOSE:
; CATEGORY:
; CALLING SEQUENCE:
; INPUTS:
;   POSITIONAL PARAMETERS:
;   KEYWORDS PARAMETERS:
; OUTPUTS:
;   POSITIONAL PARAMETERS:
;   KEYWORDS PARAMETERS:
; COMMON BLOCKS:
; SIDE EFFECTS:
; RESTRICTIONS:
; PROCEDURE:
; EXAMPLE:
; MODIFICATION HISTORY:
;       August, 1992. - Written by GLS, LMSC.
;-

if keyword_set(clean) ne 0 then begin
  !p.noerase = 0
  !x.style = 0 & !y.style = 0 & !z.style = 0
  !p.position = [0,0,0,0]
  return
end

siz_item = size(item)
if siz_item(0) gt 1 then siz = size(item) else siz = item
if n_elements(pos) eq 0 then pos = $
  [(!d.x_size-siz(1))/2,(!d.y_size-siz(2))/2]
if n_elements(noerase) eq 0 then !p.noerase = 1 else !p.noerase = 0
!x.style = 1 & !y.style = 1
pos_norm = convert_coord([pos(0),pos(0)+siz(1)-1], $
			 [pos(1),pos(1)+siz(2)-1], /dev, /to_norm)
!p.position = pos_norm(0:1,*)

end

