FUNCTION Selection, nr

; NAME:
; 	Selection
; PURPOSE:
;	Returns the name of the plot with selection
;	number nr.
; CATEGORY:
;	Data Management
; CALLING SEQUENCE
;	name = Selection(number)
; INPUT:
;	nr: entry number of the plot name in the selection list
; OUTPUT:
;	name: the name of the plot selectioned with entry "nr"
; COMMON BLOCK:
;	SelectionRetrieval
;-
; MODIFICATION HISTORY:
;	Created in April 1991, A.Csillaghy


COMMON SelectionRetrieval, plotsSelected, dum

IF N_Elements(plotsSelected) EQ 0 THEN BEGIN
  Print,' No plots selected ... '
  RETURN, ''
ENDIF

IF N_Elements(plotsSelected) LT nr+1 THEN BEGIN
  Print,' This number has no corresponding plot ... '
  RETURN, ''
ENDIF

RETURN, plotsSelected(nr)

END