/*
  spikeplot.dlg

*! VERSION 2.0.0  08nov2006

*/

VERSION 10.0

INCLUDE _std_xlarge
DEFINE _dlght 300
INCLUDE header

HELP hlp1, view("help spikeplot")
RESET res1

SCRIPT POSTINIT
BEGIN
	script gr_plots_setDefaultSpike
END

DIALOG	main,label("spikeplot - Spike plots and rootograms")		///
	tabtitle("Main")
BEGIN
  TEXT     tx_var          _lft      _top      _iwd      .,		///
	label("Variable:")
  VARNAME  vn_var          @         _ss       _vnwd     .,		///
	label("Variable")

  GROUPBOX gb_opts         @         _ls       _iwd     _ht13,		///
	label("Options")

  EDIT     en_round        _ilft     _ls       _en7wd    .,		///
	label("Bin width")						///
	numonly	default(0) option(round)
  TEXT     tx_round        _en7sep    @        _en7r2b   .,		///
	label("Bin width")

  GROUPBOX gb_yaxis	   _ilft     _ls       _ibwd     _ht6,		///
	label("Y axis")

  RADIO    rb_frequency    _indent   _ss       _inwd     .,		///
	label("Frequencies")						///
	first
  RADIO    rb_frac         @         _ss       @         .,		///
	label("Fractions") option(frac)
  RADIO    rb_root         @         _ss       @         .,		///
	label("Square roots of frequencies") last option(root)
END

INCLUDE ifin
INCLUDE weights_fai
INCLUDE gr_plots
INCLUDE gr_addplots
INCLUDE gr_yaxis
INCLUDE gr_xaxis
INCLUDE gr_titles
INCLUDE gr_legend
INCLUDE gr_overall
INCLUDE gr_by

PROGRAM command
BEGIN
	put "spikeplot "
	varlist main.vn_var
	INCLUDE _ifin_pr
	INCLUDE _weights_pr
	beginoptions
		require main.en_round
		optionarg /hidedefault main.en_round
		option main.rb_frac
		option main.rb_root

		put " " /program gr_plots_output
		put " " /program gr_yaxis_output
		put " " /program gr_xaxis_output
		put " " /program gr_titles_output
		put " " /program gr_legend_output
		put " " /program gr_overall_output
		put " " /program gr_by_output
	endoptions
END
