	PRO LABEL_SYMBOL, X0, Y0, PSYM, LABEL, LEFT=LEFT, CHARSIZE=CHAR_SIZE, $
                          _EXTRA=_EXTRA
;+
; Project     :	SOHO - CDS
;
; Name        :	
;	LABEL_SYMBOL
; Purpose     :	
;	Plots a symbol with a label next to it on a graph.
; Explanation :	
;	A plotting symbol is drawn on the plot, and then the procedure XYOUTS
;	is called to write out the label.
; Use         :	
;	LABEL_SYMBOL, X0, Y0, PSYM, LABEL
; Inputs      :	
;	X0, Y0	 = Position of the symbol.
;	PSYM	 = Plotting symbol to use.
;	LABEL	 = Character string label.
; Opt. Inputs :	
;	None.
; Outputs     :	
;	None.
; Opt. Outputs:	
;	None.
; Keywords    :	
;	LEFT	 = If set, then the label will be displayed to the left of the
;		   point X0, Y0.  Normally the label is displayed to the right.
;	CHARSIZE = Character size to use in drawing the label.
;
;       Other graphics keywords, e.g. COLOR, SYMSIZE, FONT, are also supported.
; Calls       :	
;	None.
; Common      :	
;	None.
; Restrictions:	
;	None.
; Side effects:	
;	None.
; Category    :	
;	Utilities, Graphics.
; Prev. Hist. :	
;	William Thompson, Jan 1992.
;	William Thompson, Nov 1992, modified algorithm for getting the relative
;		character size.
;	William Thompson, 6 July 1993, added call to CONVERT_COORD so as to be
;		compatible with logarithmic plots.
; Written     :	
;	William Thompson, GSFC, January 1992.
; Modified    :	
;	Version 1, William Thompson, GSFC, 9 July 1993.
;		Incorporated into CDS library.
;	Version 2, William Thompson, GSFC, 20 October 1993.
;		Brought label closer to symbol.
;       Version 3, WTT, 20-Nov-2023, use _EXTRA mechanism
; Version     :	
;	Version 3, 20-Nov-2023
;-
;
	ON_ERROR, 2
;
;  Check the number of parameters passed.
;
	IF N_PARAMS(0) NE 4 THEN BEGIN
		PRINT,'*** LABEL_SYMBOL must be called with four parameters:'
		PRINT,'                  X0, Y0, PSYM, LABEL'
		RETURN
	ENDIF
;
;  Get the relative character size.
;
	IF N_ELEMENTS(CHAR_SIZE) EQ 1 THEN CHARSIZE = CHAR_SIZE	$
		ELSE CHARSIZE = !P.CHARSIZE
	IF CHARSIZE LE 0 THEN CHARSIZE = 1
;
;  Convert from data to device coordinates.
;
	DEV = CONVERT_COORD(X0,Y0,/DATA,/TO_DEVICE)
	XX0 = DEV(0)
	YY0 = DEV(1)
;
;  Calculate the distance to offset the label.
;
	XX1 = !D.X_CH_SIZE * CHARSIZE
	YY1 = !D.Y_CH_SIZE * CHARSIZE
	IF KEYWORD_SET(LEFT) THEN XX1 = -XX1
	XX1 = XX0 + XX1
	YY1 = YY0 - YY1/3
;
;  Draw the symbol and label it.
;
	OPLOT, [X0,X0], [Y0,Y0], PSYM=PSYM, _EXTRA=_EXTRA
	XYOUTS, XX1, YY1, LABEL, CHARSIZE=CHARSIZE,	$
		ALIGNMENT=KEYWORD_SET(LEFT), /DEVICE, _EXTRA=_EXTRA
;
	RETURN
	END
