PRO Insert_Plot,name,text,xUnit,yUnit

; +
; NAME:
;	Insert_Plot
; PURPOSE:
;	Insert information about a vector (titles) in the 
;	plot list.
; CATEGORY:
;	Data Management
; CALLING SEQUENCE:
;	Insert_Plot, name, autor, instrument, source, xUnit, yUnit
; INPUTS:
;	name: the name of the plot
;	text, xUnit, yUnit; strings.
; COMMON BLOCK:
;	Data, where the plot list and table are stored.
; SIDE EFFECT:
;	The values of !x.title, !y.title and !p.title are used.
; -
; MODIFICATION HISTORY:
;	Created in June 1991 by A.Csillaghy

COMMON Data, plotList,dum

plotNr = Search_Plot(name)
IF plotNr(0) EQ -1 THEN BEGIN
  Print,' Error: plot not found ... '
  Print, ''
  RETURN
ENDIF
p =plotList(plotNr).texts
p.text = text
p.xUnit = xUnit
p.yTitle = !y.title
p.yUnit = yUnit
p.title = !p.title
plotList(plotNr).texts = p

END
