;========================================================================
;+
; NAME:
;  sprl_plot_sym - generated user defined plot symbols
;
PRO SPRL_PLOT_SYM, SIZE=SIZE, 	$
                   FILL=FILL,      $
                   NOFILL=NOFILL,  $
                   CIRCLE=CIRCLE,  $
                   THICK=THICK,    $
                   SQUARE=SQUARE,  $
                   DIAMOND=DIAMOND, $
                   TRIANGLE=TRIANGLE, $
                   TRIDOWN=TRIDOWN, $
                   PENTAGON=PENTAGON
;
; This routine generates a user defined plot symbol which is used by the PLOT 
; command by setting PSYM = 8.  The default symbol is a filled circle.
;
; SIZE      - Size of plot symbols (default 1.0).
;
; SQUARE    - Set this keyword if you want square plot symbols (default circles)
;
; DIAMOND   - Set this keyword if you want square plot symbols
;
; TRIANGLE  - Set this keyword if you want triangle plot symbols,
;             point up
;
; TRIDOWN   - Set this keyword if you want triangle plot symbols,
;             point down
;
; NOFILL    - Set this keyword if you don't want the symbols filled 
;
; THICK     - Line thickness of plot symbols (default 1).
;
; Example:  IDL> PLOT_SYM, SIZE=1.2, /SQUARE, /NOFILL   - gives open squares of
;                                                         size 1.2
;-
;========================================================================
;
;
	if keyword_set(size)	$
	then	psize = 7. * size / 6. $
	else	psize = 7./6.

	if keyword_set(thick)	$
	then	thick = thick	$
	else	thick = 1


	case 1 of
	keyword_set(square): begin
		sym = ( findgen(5) * (!pi*2/4) ) + (!pi/4)
	end
	keyword_set(diamond): begin
		sym = findgen(5) * (!pi * 2 / 4.)
	end
	keyword_set(triangle): begin
		sym = (findgen(4) * (!pi*2/3.)) + (!pi/2)
	end
	keyword_set(tridown): begin
		sym = (findgen(4) * (!pi*2/3.)) + (3*!pi/2)
	end
        keyword_set(pentagon): begin
                sym = findgen(6) * (!pi*3./5.)
        end
	else: begin
		sym = findgen(17) * (!pi * 2 / 16.)
	end
	endcase

	if keyword_set(nofill) $
	then	usersym, cos(sym)*psize, sin(sym)*psize, thick=thick	$
	else	usersym, cos(sym)*psize, sin(sym)*psize, /fill, thick=thick

	return
end
