
/*
  gxaxis.idlg Include for graphics x-axis

*!  VERSION 1.1.3  22jul2005

  Note: This include file is closely related to gyaxis and graxis.  Any
  changes should be reflected in those files.
*/

SCRIPT gxaxis_PREINIT
BEGIN
	create STRING gxaxis_maxes
END

DIALOG gxaxis, tabtitle("X-Axis")
BEGIN
  /* LEFT SIDE-- Title */
  GROUPBOX gb_title    _lft        _top      _gwd1       _ht20,	///
	label("Title ")
  EDIT     ed_title    _lft1g      _ss       _cwd1gb     .,	///
	option(xtitle)
  /* LEFT SIDE-- Title col(1) */
  TEXT     tx_size     _igft       _ms       _txwd       .,	///
	label("Size:")  right
  DEFINE   y @y
  COMBOBOX cb_size     _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(textsizes) option(size)
  TEXT     tx_tclr     _igft       _ms       _txwd       .,	///
	label("Color:")	right
  COMBOBOX cb_tclr     _txsep      @         _tcr2b4g    .,	///
	dropdownlist contents(colors) option(color)		///
	onselchangelist(gxaxis_cl_tclr_sel)
  COLOR    cl_tclr     _tcr2b4gsep @         _colorwd    ., option(color)
  TEXT     tx_orient   _igft       _ms       _txwd       .,	///
	label("Orientation:") right
  COMBOBOX cb_orient   _txsep      @         _txr2b4g    .,	///
	dropdownlist option(orientation)			///
	contents(orientation)					///
	values(orientation_values)

  /* LEFT SIDE-- Title upper col(2)*/

  TEXT     tx_just     _gft4_2     y         _txwd       .,	///
	label("Justify:") right
  COMBOBOX cb_just     _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(justification) option(justification)
  TEXT     tx_align    _lft4_2g    _ms       _txwd       .,	///
	label("Alignment:") right
  COMBOBOX cb_align    _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(alignment) option(alignment)
  TEXT     tx_margin   _lft4_2g    _ms       _txwd       .,	///
	label("Margin:") right
  COMBOBOX cb_margin   _txsep      @         _txr2b4g    .,	///
	dropdown contents(margin) option(margin)
  TEXT     tx_ttlgp    _gft4_2     _ms       _txwd       .,	///
	label("Title gap:") right
  EDIT     ed_ttlgp    _txsep      @         _txr2b4g    .,	///
	label("Title gap") option(titlegap)

  /* LEFT SIDE-- Title lower*/
  CHECKBOX ck_box      _igft       _ms       _cwd1gb     _ht5,	///
	groupbox label("Box") option(box)			///
	onclickon(script gxbox_enable) 				///
	onclickoff(script gxbox_disable)
  /* LEFT SIDE-- Title lower col(1)*/
  TEXT     tx_bclr     _iigft      _ms       _txswd      .,	///
	label("Fill color:") right
  COMBOBOX cb_bclr     _txssep     @         _tcr2b4g    .,	///
	dropdownlist contents(colors) option(fcolor)		///
	onselchangelist(gxaxis_cl_bclr_sel)
  COLOR    cl_bclr     _tcr2b4gsep @         _colorwd    ., option(fcolor)
  DEFINE   ymk @y
  TEXT     tx_blclr    _iigft      _ms       _txswd      .,	///
	label("Line color:") right
  COMBOBOX cb_blclr    _txssep     @         _tcr2b4g    .,	///
	dropdownlist contents(colors) option(lcolor)		///
	onselchangelist(gxaxis_cl_blclr_sel)
  COLOR    cl_blclr    _tcr2b4gsep @         _colorwd    ., option(lcolor)
  TEXT     tx_bmargin  _gft4_2     ymk       _txswd      .,	///
	label("Margin:") right
  COMBOBOX cb_bmargin  _txssep     @         _txr2b4g    .,	///
	dropdown contents(margin) option(bmargin)
  CHECKBOX ck_expand   @           _ms       _txr2b4g    .,	///
	label("Ignore text") option(bexpand)

  /* LEFT SIDE-- Options */
  GROUPBOX gb_option   _lft        _xls      _gwd1       _ht7,	///
	label("Scale options ")
  /* LEFT SIDE-- Options col(1) */
  CHECKBOX ck_range    _igft       _ss       _txwd       .,	///
	label("Range:")						///
	onclickon(script gxaxis_range_enable)			///
  	onclickoff(script gxaxis_range_disable)
  EDIT     ed_rangefm  _txsep      @         _en7wd      .,	///
	label("X-Axis Range from:") default(.)	option(range)
  TEXT     tx_rangeto  _en7sep     @         20          .,	///
	label("to:")
  EDIT     ed_rangeto  +25         @         _en7wd      .,	///
	label("X-Axis Range to:") default(.)
  DEFINE   y @y
  TEXT     tx_lclr     _igft       _ms       _txwd       .,	///
	label("Color:") right
  COMBOBOX cb_lclr     _txsep      @         _tcr2b4g    .,	///
	dropdownlist contents(colors) option(lcolor)		///
	onselchangelist(gxaxis_cl_lclr_sel)
  COLOR    cl_lclr     _tcr2b4gsep @         _colorwd    ., option(lcolor)
  TEXT     tx_outergp  _igft       _ms       _txwd       .,	///
	label("Outer gap:") right
  EDIT     ed_outergp  _txsep      @         _txr2b4g    .,	///
	label("Outer gap") option(outergap)
  /* LEFT SIDE-- Options col(2) */
  TEXT     tx_scfake   _gft4_2     y         0           0,
  CHECKBOX ck_scaleoff _txsep	   @	     _tcr2b4g    .,	///
	label("Hide axis") option(off)				///
	onclickon(program gxaxis_hide_scale_check)		///
	onclickoff(program gxaxis_hide_scale_check)
  CHECKBOX ck_log      @           _ms       _tcr2b4g    .,	///
	label("Log") option(log)
  CHECKBOX ck_rev      @           _ms       _tcr2b4g    .,	///
	label("Reverse") option(reverse)

  /**************************************************************/

  /* RIGHT SIDE-- Ticks / Lines */
  GROUPBOX gb_mode     _lft2g      _top      _gwd1       _ht30h, ///
	label("Ticks / Lines ")
  COMBOBOX cb_tkmode   _igft2      _ss       _cwd4_6     .,	///
	dropdownlist  contents(gxtick_opt) onselchangelist(gxmode_change)
  TEXT     tx_tkmode   +150        @         _cwd4_6     .,
  TEXT     tx_mark2    _igft2      _ms       0           0,
  DEFINE   rty @y
  /**************************************************************/
  /* RIGHT SIDE-- Major Ticks */
  TEXT     tx_rule     _igft2      rty       _txwd	 .,	///
	label("Rule:") right
  EDIT     ed_rule     _txsep      @         _tcr2gi     .,
  BUTTON   bt_rule     _tcr2gisep  @         _btwd       .,	///
	label("?") onpush(view help major_tick_rule##|_new)
  TEXT     tx_cstm     _igft2      _ms       _txwd	 .,	///
	label("Custom:") right
  EDIT     ed_cstm     _txsep      @         _tcr2gi     .,
  BUTTON   bt_cstm     _tcr2gisep  @         _btwd       .,	///
	label("?") onpush(view help custom_tick_labels##|_new)

  /* RIGHT SIDE-- Major Ticks upper col(1) */
  TEXT     tx_tpos     _igft2      _ms       _txwd       .,	///
	label("Position:") right
  COMBOBOX cb_tpos     _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(tickpos) option(tposition)
  DEFINE   y @y
  TEXT     tx_tlng     _igft2      _ms       _txwd       .,	///
	label("Length:") right
  EDIT     ed_tlng     _txsep      @         _txr2b4g    .,	///
	label("Length") option(tlength)
  TEXT     tx_notk     _igft2      _ms       _txwd       .,	///
	label("Hide tick:") right
  COMBOBOX cb_notk     _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(yesno)  values(gxaxis_cb_tick)
  TEXT     tx_nolab    _igft2      _ms       _txwd       .,	///
	label("Hide label:") right
  COMBOBOX cb_nolab    _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(yesno) values(gxaxis_cb_label)
  CHECKBOX ck_vlab     @           _ms       _txr2b4g    .,	///
	label("Value labels") option(valuelabel)
  CHECKBOX ck_altr     @           _ss       _txr2b4g    .,	///
	label("Alt. labels") option(alternate)
  TEXT     tx_tmark    _igft2      _vss      _txr2b4g    0,
  DEFINE   y2 @y

  /* RIGHT SIDE-- Major Ticks upper col(2) */
  TEXT     tx_tlclr    _gft4_4     y         _txwd       .,	///
	label("Color:")	right
  COMBOBOX cb_tlclr    _txsep      @         _tcr2b4g    .,	///
	dropdownlist contents(colors) onselchangelist(gxaxis_cl_tlclr_sel)
  COLOR    cl_tlclr    _tcr2b4gsep @         _colorwd    .,
  TEXT     tx_ang      _gft4_4     _ms       _txwd       .,	///
	label("Angle:") right
  COMBOBOX cb_ang      _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(angles) option(angle)
  TEXT     tx_fmt      _gft4_4     _ms       _txwd       .,	///
	label("Format:") right
  EDIT     ed_fmt      _txsep      @         _tcr2b4g    .,	///
	option(format)
  BUTTON   bt_fmt      _tcr2b4gsep @         _btwd       .,	///
	label("?") onpush(view help format##|_new)
  TEXT     tx_lgap     _gft4_4     _ms       _txwd       .,	///
	label("Label gap:") right
  EDIT     ed_lgap     _txsep      @         _txr2b4g    .,	///
	option(labgap)
  TEXT     tx_lsize    _gft4_4     _ms       _txwd       .,	///
	label("Label size:") right
  COMBOBOX cb_lsize    _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(textsizes) option(labsize)

  /* RIGHT SIDE-- Major Ticks lower*/
  CHECKBOX ck_grid     _igft2      y2        _gwd2       _ht7,	///
	groupbox label("Grid")	option(grid)			///
	onclickon(script gxgrid_enable)				///
	onclickoff(script gxgrid_disable)
  /* RIGHT SIDE-- Major Ticks lower col(1)*/
  TEXT     tx_gall     _iigft2     _ss       _txswd      .,	///
	label("All lines:") right
  COMBOBOX cb_gall     _txssep     @         _txr2b4g    .,	///
	dropdownlist contents(yesno) values(gxaxis_cb_gall)
  DEFINE   y @y
  TEXT     tx_gwd      _iigft2     _ms       _txswd      .,	///
	label("Width:") right
  COMBOBOX cb_gwd      _txssep     @         _txr2b4g    .,	///
	dropdownlist contents(linewidths) option(glwidth)
  /* RIGHT SIDE-- Major Ticks lower col(2)*/
  TEXT     tx_gclr     _gft4_4     y         _txswd      .,	///
	label("Color:") right
  COMBOBOX cb_gclr     _txssep     @         _tcr2b4g    .,	///
	dropdownlist contents(colors) option(glcolor)		///
	onselchangelist(gxaxis_cl_gclr_sel)
  COLOR    cl_gclr     _tcr2b4gsep @         _colorwd    ., option(glcolor)
  TEXT     tx_pat      _gft4_4     _ms       _txswd      .,	///
	label("Pattern:") right
  COMBOBOX cb_pat      _txssep     @         _txr2b4g    .,	///
	dropdownlist contents(linepatterns) option(glpattern)
  TEXT     tx_extend   _iigft2     _ms       _txr2gia    .,	///
	label("Extend into plot region margin:") right
  COMBOBOX cb_extend   _txr2giasep @         _txr2b4g    .,	///
	dropdownlist contents(yesno) values(gxaxis_cb_gextend)
  /**************************************************************/
  /* RIGHT SIDE-- Minor Ticks */
  TEXT     tx_mrule    _igft2      rty       _txwd       .,	///
	label("Rule:") right
  EDIT     ed_mrule    _txsep      @         _tcr2gi     .,
  BUTTON   bt_mrule    _tcr2gisep  @         _btwd       .,	///
	label("?") onpush(view help minor_tick_rule##|_new)
  TEXT     tx_mcstm    _igft2      _ms       _txwd	 .,	///
	label("Custom:") right
  EDIT     ed_mcstm    _txsep      @         _tcr2gi     .,	///
	label("Custom")
  BUTTON   bt_mcstm    _tcr2gisep  @         _btwd       .,	///
	label("?") onpush(view help custom_tick_labels##|_new)

  /* RIGHT SIDE-- Minor Ticks upper col(1) */
  TEXT     tx_mtpos    _igft2      _ms       _txwd       .,  	///
	label("Position:") right
  COMBOBOX cb_mtpos    _txsep      @         _txr2b4g    .,	///
	dropdownlist  contents(tickpos)	option(tposition)
  DEFINE   y @y
  TEXT     tx_mtlng    _igft2      _ms       _txwd       .,	///
	label("Length:") right
  EDIT     ed_mtlng    _txsep      @         _txr2b4g    .,	///
	label("Length") option(tlength)
  TEXT     tx_mnotk    _igft2      _ms       _txwd       .,	///
	label("Hide tick:") right
  COMBOBOX cb_mnotk    _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(yesno) values(gxaxis_cb_tick)
  TEXT     tx_mnolab   _igft2      _ms       _txwd       .,	///
	label("Hide label:") right
  COMBOBOX cb_mnolab   _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(yesno) values(gxaxis_cb_label)
  CHECKBOX ck_mvlab    @           _ms       _txr2b4g    .,	///
	label("Value labels") option(valuelabel)
  CHECKBOX ck_maltr    @           _ss       _txr2b4g    .,	///
	label("Alt. labels") option(alternate)
  TEXT     tx_mtmark   _igft2      _vss      0           0,
  DEFINE   y2 @y

  /* RIGHT SIDE-- Minor Ticks upper col(2) */

  TEXT     tx_mtlclr   _gft4_4     y         _txwd       .,	///
	label("Color:") right
  COMBOBOX cb_mtlclr   _txsep      @         _tcr2b4g    .,	///
	dropdownlist contents(colors) onselchangelist(gxaxis_cl_mtlclr_sel)
  COLOR    cl_mtlclr   _tcr2b4gsep @         _colorwd    .,
  TEXT     tx_mang     _gft4_4     _ms       _txwd       .,	///
	label("Angle:") right
  COMBOBOX cb_mang     _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(angles) option(angle)
  TEXT     tx_mfmt     _gft4_4     _ms       _txwd       .,	///
	label("Format:") right
  EDIT     ed_mfmt     _txsep      @         _tcr2b4g    .,	///
	option(format)
  BUTTON   bt_mfmt     _tcr2b4gsep @         _btwd       .,	///
	label("?") onpush(view help format##|_new)
  TEXT     tx_mlgap    _gft4_4     _ms       _txwd       .,	///
	label("Label gap:") right
  EDIT     ed_mlgap    _txsep      @         _txr2b4g    .,	///
	option(labgap)
  TEXT     tx_mlsize   _gft4_4     _ms       _txwd       .,	///
	label("Label size:") right
  COMBOBOX cb_mlsize   _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(textsizes) option(labsize)

  /* RIGHT SIDE-- Minor Ticks lower*/
  CHECKBOX ck_mgrid    _igft2      y2        _cwd1gb     _ht7,	///
	groupbox label("Grid") option(grid)			///
	onclickon(script gxmgrid_enable)			///
	onclickoff(script gxmgrid_disable)
  /* RIGHT SIDE-- Minor Ticks lower col(1)*/
  TEXT     tx_mgall    _iigft2     _ss       _txswd      .,	///
	label("All lines:") right
  COMBOBOX cb_mgall    _txssep     @         _txr2b4g    .,	///
	dropdownlist contents(yesno) values(gxaxis_cb_gall)
  DEFINE   y @y
  TEXT     tx_mgwd     _iigft2     _ms       _txswd      .,	///
	label("Width:") right
  COMBOBOX cb_mgwd     _txssep     @         _txr2b4g    .,	///
	dropdownlist contents(linewidths) option(glwidth)
  /* RIGHT SIDE-- Minor Ticks lower col(2)*/
  TEXT     tx_mgclr    _gft4_4   y         _txswd        .,	///
	label("Color:") right
  COMBOBOX cb_mgclr    _txssep     @         _tcr2b4g    .,	///
	dropdownlist contents(colors) option(glcolor)		///
	onselchangelist(gxaxis_cl_mgclr_sel)
  COLOR    cl_mgclr    _tcr2b4gsep @         _colorwd    ., option(glcolor)
  TEXT     tx_mpat     _gft4_4     _ms       _txswd      .,	///
	label("Pattern:") right
  COMBOBOX cb_mpat     _txssep     @         _txr2b4g    .,	///
	dropdownlist contents(linepatterns) option(glpattern)
  TEXT     tx_mextend  _iigft2     _ms       _txr2gia    .,	///
	label("Extend into plot region margin:") right
  COMBOBOX cb_mextend  _txr2giasep @         _txr2b4g    .,	///
	dropdownlist contents(yesno)  values(gxaxis_cb_gextend)
  /**************************************************************/
  /* Line options */
  TEXT     tx_lline    _igft2      rty       _txwd       .,	///
	label("Values:") right
  EDIT     ed_lline    _txsep      @         _txr2gi     .,
  /* Line options col(1) */
  TEXT     tx_llwd     _iigft2     _ms       _txswd      .,	///
	label("Width:") right
  COMBOBOX cb_llwd     _txssep     @         _txr2b4g    .,	///
	dropdownlist contents(linewidths) option(lwidth)
  /* Line options col(2) */
  TEXT     tx_llclr    _gft4_4     @         _txwd       .,	///
	label("Color:") right
  COMBOBOX cb_llclr    _txsep      @         _tcr2b4g    .,	///
	dropdownlist contents(colors) option(lcolor)		///
	onselchangelist(gxaxis_cl_llclr_sel)
  COLOR    cl_llclr    _tcr2b4gsep @         _colorwd    ., option(lcolor)
  TEXT     tx_llpat    _gft4_4     _ms       _txwd       .,	///
	label("Pattern:") right
  COMBOBOX cb_llpat    _txsep      @         _txr2b4g    .,	///
	dropdownlist contents(linepatterns) option(lpattern)
  TEXT     tx_lextend  _igft2      _ms       _txr2ga     .,	///
	label("Extend into plot region margin:") right
  COMBOBOX cb_lextend  _txr2gasep  @         _txr2b4g    .,	///
	dropdownlist contents(yesno) values(gxaxis_cb_extend)
END

LIST gxtick_opt
BEGIN
	"Major ticks"
	"Minor ticks"
	"Additional lines"
END

LIST gxmode_change
BEGIN
	script gxmajor_on
	script gxminor_on
	script gxlines_on
END

LIST gxaxis_cl_tclr_sel
BEGIN
	gxaxis.cl_tclr.hide
	gxaxis.cl_tclr.show
	gxaxis.cl_tclr.hide
END

LIST gxaxis_cl_bclr_sel
BEGIN
	gxaxis.cl_bclr.hide
	gxaxis.cl_bclr.show
	gxaxis.cl_bclr.hide
END

LIST gxaxis_cl_blclr_sel
BEGIN
	gxaxis.cl_blclr.hide
	gxaxis.cl_blclr.show
	gxaxis.cl_blclr.hide
END

LIST gxaxis_cl_lclr_sel
BEGIN
	gxaxis.cl_lclr.hide
	gxaxis.cl_lclr.show
	gxaxis.cl_lclr.hide
END

LIST gxaxis_cl_tlclr_sel
BEGIN
	gxaxis.cl_tlclr.hide
	gxaxis.cl_tlclr.show
	gxaxis.cl_tlclr.hide
END

LIST gxaxis_cl_gclr_sel
BEGIN
	gxaxis.cl_gclr.hide
	gxaxis.cl_gclr.show
	gxaxis.cl_gclr.hide
END

LIST gxaxis_cl_mtlclr_sel
BEGIN
	gxaxis.cl_mtlclr.hide
	gxaxis.cl_mtlclr.show
	gxaxis.cl_mtlclr.hide
END

LIST gxaxis_cl_mgclr_sel
BEGIN
	gxaxis.cl_mgclr.hide
	gxaxis.cl_mgclr.show
	gxaxis.cl_mgclr.hide
END
LIST gxaxis_cl_llclr_sel
BEGIN
	gxaxis.cl_llclr.hide
	gxaxis.cl_llclr.show
	gxaxis.cl_llclr.hide
END

LIST gxaxis_cb_tick
BEGIN
	""
	"noticks"
	"ticks"
END

LIST gxaxis_cb_label
BEGIN
	""
	"nolabels"
	"labels"
END

LIST gxaxis_cb_gall
BEGIN
	""
	"gmax gmin"
	"nogmax nogmin"
END

LIST gxaxis_cb_gextend
BEGIN
	""
	"gextend"
	"nogextend"
END

LIST gxaxis_cb_extend
BEGIN
	""
	"extend"
	"noextend"
END

PROGRAM gxaxis_hide_scale_check
BEGIN
	if !H(gxaxis.ck_scaleoff) {
		if gxaxis.ck_scaleoff {
			call script gxaxis_hide_scale_on
		}
		if !gxaxis.ck_scaleoff {
			call script gxaxis_hide_scale_off
		}
	}

END

SCRIPT gxaxis_hide_scale_off
BEGIN
	program gxtitle_enable
	program gxscale_enable
	program gxmajor_enable
	program gxminor_enable
END

PROGRAM gxtitle_enable
BEGIN
	call gaction gxaxis.gb_title.enable
	call gaction gxaxis.ed_title.enable
	call gaction gxaxis.tx_size.enable
	call gaction gxaxis.cb_size.enable
	call gaction gxaxis.tx_tclr.enable
	call gaction gxaxis.cb_tclr.enable
	call gaction gxaxis.cl_tclr.enable
	call gaction gxaxis.tx_orient.enable
	call gaction gxaxis.cb_orient.enable
	call gaction gxaxis.tx_just.enable
	call gaction gxaxis.cb_just.enable
	call gaction gxaxis.tx_align.enable
	call gaction gxaxis.cb_align.enable
	call gaction gxaxis.tx_margin.enable
	call gaction gxaxis.cb_margin.enable
	call gaction gxaxis.tx_ttlgp.enable
	call gaction gxaxis.ed_ttlgp.enable
	call gaction gxaxis.ck_box.enable
	if gxaxis.ck_box {
		call script gxbox_enable
	}
END

PROGRAM gxscale_enable
BEGIN
	call gaction gxaxis.tx_lclr.enable
	call gaction gxaxis.cb_lclr.enable
	call gaction gxaxis.cl_lclr.enable
	call gaction gxaxis.tx_outergp.enable
	call gaction gxaxis.ed_outergp.enable
END

PROGRAM gxmajor_enable
BEGIN
	/* Major ticks */
	call gaction gxaxis.tx_rule.enable
	call gaction gxaxis.ed_rule.enable
	call gaction gxaxis.bt_rule.enable
	call gaction gxaxis.tx_cstm.enable
	call gaction gxaxis.ed_cstm.enable
	call gaction gxaxis.bt_cstm.enable
	call gaction gxaxis.tx_tpos.enable
	call gaction gxaxis.cb_tpos.enable
	call gaction gxaxis.tx_tlng.enable
	call gaction gxaxis.ed_tlng.enable
	call gaction gxaxis.tx_notk.enable
	call gaction gxaxis.cb_notk.enable
	call gaction gxaxis.tx_nolab.enable
	call gaction gxaxis.cb_nolab.enable
	call gaction gxaxis.ck_vlab.enable
	call gaction gxaxis.ck_altr.enable
	call gaction gxaxis.tx_tlclr.enable
	call gaction gxaxis.cb_tlclr.enable
	call gaction gxaxis.cl_tlclr.enable
	call gaction gxaxis.tx_ang.enable
	call gaction gxaxis.cb_ang.enable
	call gaction gxaxis.tx_fmt.enable
	call gaction gxaxis.ed_fmt.enable
	call gaction gxaxis.bt_fmt.enable
	call gaction gxaxis.tx_lgap.enable
	call gaction gxaxis.ed_lgap.enable
	call gaction gxaxis.tx_lsize.enable
	call gaction gxaxis.cb_lsize.enable
	call gaction gxaxis.ck_grid.enable
	if gxaxis.ck_grid {
		call script gxgrid_enable
	}
END

PROGRAM gxminor_enable
BEGIN
	/* Minor ticks */
	call gaction gxaxis.tx_mrule.enable
	call gaction gxaxis.ed_mrule.enable
	call gaction gxaxis.bt_mrule.enable
	call gaction gxaxis.tx_mcstm.enable
	call gaction gxaxis.ed_mcstm.enable
	call gaction gxaxis.bt_mcstm.enable
	call gaction gxaxis.tx_mtpos.enable
	call gaction gxaxis.cb_mtpos.enable
	call gaction gxaxis.tx_mtlng.enable
	call gaction gxaxis.ed_mtlng.enable
	call gaction gxaxis.tx_mnotk.enable
	call gaction gxaxis.cb_mnotk.enable
	call gaction gxaxis.tx_mnolab.enable
	call gaction gxaxis.cb_mnolab.enable
	call gaction gxaxis.ck_mvlab.enable
	call gaction gxaxis.ck_maltr.enable
	call gaction gxaxis.tx_mtlclr.enable
	call gaction gxaxis.cb_mtlclr.enable
	call gaction gxaxis.cl_mtlclr.enable
	call gaction gxaxis.tx_mang.enable
	call gaction gxaxis.cb_mang.enable
	call gaction gxaxis.tx_mfmt.enable
	call gaction gxaxis.ed_mfmt.enable
	call gaction gxaxis.bt_mfmt.enable
	call gaction gxaxis.tx_mlgap.enable
	call gaction gxaxis.ed_mlgap.enable
	call gaction gxaxis.tx_mlsize.enable
	call gaction gxaxis.cb_mlsize.enable
	call gaction gxaxis.ck_mgrid.enable
	if gxaxis.ck_mgrid {
		call script gxmgrid_enable
	}
END

/* Begin Enable All */
SCRIPT gxaxis_enable
BEGIN
	program gxaxis_enable_pr
END

PROGRAM gxaxis_enable_pr
BEGIN
	call gaction gxaxis.gb_option.enable
	call gaction gxaxis.ck_range.enable
	if gxaxis.ck_range {
		call script gxaxis_range_enable
	}
	call gaction gxaxis.ck_log.enable
	call gaction gxaxis.ck_rev.enable
	call gaction gxaxis.ck_scaleoff.enable
	if !gxaxis.ck_scaleoff {
		call program gxtitle_enable
		call program gxscale_enable
		call program gxmajor_enable
		call program gxminor_enable

	}

	call gaction gxaxis.gb_mode.enable
	call gaction gxaxis.cb_tkmode.enable
	call gaction gxaxis.tx_tkmode.enable

	/* Line options */
	call gaction gxaxis.tx_lline.enable
	call gaction gxaxis.ed_lline.enable
	call gaction gxaxis.tx_llwd.enable
	call gaction gxaxis.cb_llwd.enable
	call gaction gxaxis.tx_llclr.enable
	call gaction gxaxis.cb_llclr.enable
	call gaction gxaxis.cl_llclr.enable
	call gaction gxaxis.tx_llpat.enable
	call gaction gxaxis.cb_llpat.enable
	call gaction gxaxis.tx_lextend.enable
	call gaction gxaxis.cb_lextend.enable
END
/* End Enable All */

SCRIPT gxtitle_disable
BEGIN
	gxaxis.gb_title.disable
	gxaxis.ed_title.disable
	gxaxis.tx_size.disable
	gxaxis.cb_size.disable
	gxaxis.tx_tclr.disable
	gxaxis.cb_tclr.disable
	gxaxis.cl_tclr.disable
	gxaxis.tx_orient.disable
	gxaxis.cb_orient.disable
	gxaxis.tx_just.disable
	gxaxis.cb_just.disable
	gxaxis.tx_align.disable
	gxaxis.cb_align.disable
	gxaxis.tx_margin.disable
	gxaxis.cb_margin.disable
	gxaxis.tx_ttlgp.disable
	gxaxis.ed_ttlgp.disable
	gxaxis.ck_box.disable
	script gxbox_disable
END

SCRIPT gxscale_opt_disable
BEGIN
	gxaxis.tx_lclr.disable
	gxaxis.cb_lclr.disable
	gxaxis.cl_lclr.disable
	gxaxis.tx_outergp.disable
	gxaxis.ed_outergp.disable
END

SCRIPT gxmajor_disable
BEGIN
	/* Major ticks */
	gxaxis.tx_rule.disable
	gxaxis.ed_rule.disable
	gxaxis.bt_rule.disable
	gxaxis.tx_cstm.disable
	gxaxis.ed_cstm.disable
	gxaxis.bt_cstm.disable
	gxaxis.tx_tpos.disable
	gxaxis.cb_tpos.disable
	gxaxis.tx_tlng.disable
	gxaxis.ed_tlng.disable
	gxaxis.tx_notk.disable
	gxaxis.cb_notk.disable
	gxaxis.tx_nolab.disable
	gxaxis.cb_nolab.disable
	gxaxis.ck_vlab.disable
	gxaxis.ck_altr.disable
	gxaxis.tx_tlclr.disable
	gxaxis.cb_tlclr.disable
	gxaxis.cl_tlclr.disable
	gxaxis.tx_ang.disable
	gxaxis.cb_ang.disable
	gxaxis.tx_fmt.disable
	gxaxis.ed_fmt.disable
	gxaxis.bt_fmt.disable
	gxaxis.tx_lgap.disable
	gxaxis.ed_lgap.disable
	gxaxis.tx_lsize.disable
	gxaxis.cb_lsize.disable
	gxaxis.ck_grid.disable
	script gxgrid_disable
END

SCRIPT gxminor_disable
BEGIN
	/* Minor ticks */
	gxaxis.tx_mrule.disable
	gxaxis.ed_mrule.disable
	gxaxis.bt_mrule.disable
	gxaxis.tx_mcstm.disable
	gxaxis.ed_mcstm.disable
	gxaxis.bt_mcstm.disable
	gxaxis.tx_mtpos.disable
	gxaxis.cb_mtpos.disable
	gxaxis.tx_mtlng.disable
	gxaxis.ed_mtlng.disable
	gxaxis.tx_mnotk.disable
	gxaxis.cb_mnotk.disable
	gxaxis.tx_mnolab.disable
	gxaxis.cb_mnolab.disable
	gxaxis.ck_mvlab.disable
	gxaxis.ck_maltr.disable
	gxaxis.tx_mtlclr.disable
	gxaxis.cb_mtlclr.disable
	gxaxis.cl_mtlclr.disable
	gxaxis.tx_mang.disable
	gxaxis.cb_mang.disable
	gxaxis.tx_mfmt.disable
	gxaxis.ed_mfmt.disable
	gxaxis.bt_mfmt.disable
	gxaxis.tx_mlgap.disable
	gxaxis.ed_mlgap.disable
	gxaxis.tx_mlsize.disable
	gxaxis.cb_mlsize.disable
	gxaxis.ck_mgrid.disable
	script gxmgrid_disable
END

/* Disable components associated with scale(off) */
SCRIPT gxaxis_hide_scale_on
BEGIN
	script gxtitle_disable
	script gxscale_opt_disable
	script gxmajor_disable
	script gxminor_disable
	gxaxis.cb_tkmode.setvalue "Additional lines"
END

/* Begin Disable All */
SCRIPT gxaxis_disable
BEGIN
	script gxtitle_disable
	gxaxis.gb_option.disable
	gxaxis.ck_scaleoff.disable
	script gxscale_opt_disable
	gxaxis.ck_range.disable
	script gxaxis_range_disable
	gxaxis.ck_log.disable
	gxaxis.ck_rev.disable

	gxaxis.gb_mode.disable
	gxaxis.cb_tkmode.disable
	gxaxis.tx_tkmode.disable

	script gxmajor_disable
	script gxminor_disable

	/* Line options */
	gxaxis.tx_lline.disable
	gxaxis.ed_lline.disable
	gxaxis.tx_llwd.disable
	gxaxis.cb_llwd.disable
	gxaxis.tx_llclr.disable
	gxaxis.cb_llclr.disable
	gxaxis.cl_llclr.disable
	gxaxis.tx_llpat.disable
	gxaxis.cb_llpat.disable
	gxaxis.tx_lextend.disable
	gxaxis.cb_lextend.disable
END
/* End Disable All */

SCRIPT gxaxis_range_enable
BEGIN
	gxaxis.ed_rangefm.enable
	gxaxis.tx_rangeto.enable
	gxaxis.ed_rangeto.enable
END

SCRIPT gxaxis_range_disable
BEGIN
	gxaxis.ed_rangefm.disable
	gxaxis.tx_rangeto.disable
	gxaxis.ed_rangeto.disable
END

SCRIPT gxgrid_enable
BEGIN
	gxaxis.tx_gall.enable
	gxaxis.cb_gall.enable
	gxaxis.tx_gwd.enable
	gxaxis.cb_gwd.enable
	gxaxis.tx_gclr.enable
	gxaxis.cb_gclr.enable
	gxaxis.cl_gclr.enable
	gxaxis.tx_pat.enable
	gxaxis.cb_pat.enable
	gxaxis.tx_extend.enable
	gxaxis.cb_extend.enable
END

SCRIPT gxgrid_disable
BEGIN
	gxaxis.tx_gall.disable
	gxaxis.cb_gall.disable
	gxaxis.tx_gwd.disable
	gxaxis.cb_gwd.disable
	gxaxis.tx_gclr.disable
	gxaxis.cb_gclr.disable
	gxaxis.cl_gclr.disable
	gxaxis.tx_pat.disable
	gxaxis.cb_pat.disable
	gxaxis.tx_extend.disable
	gxaxis.cb_extend.disable
END

SCRIPT gxmgrid_enable
BEGIN
	gxaxis.tx_mgall.enable
	gxaxis.cb_mgall.enable
	gxaxis.tx_mgwd.enable
	gxaxis.cb_mgwd.enable
	gxaxis.tx_mgclr.enable
	gxaxis.cb_mgclr.enable
	gxaxis.cl_mgclr.enable
	gxaxis.tx_mpat.enable
	gxaxis.cb_mpat.enable
	gxaxis.tx_mextend.enable
	gxaxis.cb_mextend.enable
END

SCRIPT gxmgrid_disable
BEGIN
	gxaxis.tx_mgall.disable
	gxaxis.cb_mgall.disable
	gxaxis.tx_mgwd.disable
	gxaxis.cb_mgwd.disable
	gxaxis.tx_mgclr.disable
	gxaxis.cb_mgclr.disable
	gxaxis.cl_mgclr.disable
	gxaxis.tx_mpat.disable
	gxaxis.cb_mpat.disable
	gxaxis.tx_mextend.disable
	gxaxis.cb_mextend.disable
END

SCRIPT gxbox_enable
BEGIN
	gxaxis.tx_bclr.enable
	gxaxis.cb_bclr.enable
	gxaxis.cl_bclr.enable
	gxaxis.tx_blclr.enable
	gxaxis.cb_blclr.enable
	gxaxis.cl_blclr.enable
	gxaxis.tx_bmargin.enable
	gxaxis.cb_bmargin.enable
	gxaxis.ck_expand.enable
END
SCRIPT gxbox_disable
BEGIN
	gxaxis.tx_bclr.disable
	gxaxis.cb_bclr.disable
	gxaxis.cl_bclr.disable
	gxaxis.tx_blclr.disable
	gxaxis.cb_blclr.disable
	gxaxis.cl_blclr.disable
	gxaxis.tx_bmargin.disable
	gxaxis.cb_bmargin.disable
	gxaxis.ck_expand.disable
END

SCRIPT gxmajor_show
BEGIN
	gxaxis.tx_rule.show
	gxaxis.ed_rule.show
	gxaxis.bt_rule.show
	gxaxis.tx_cstm.show
	gxaxis.ed_cstm.show
	gxaxis.bt_cstm.show
	gxaxis.tx_notk.show
	gxaxis.cb_notk.show
	gxaxis.tx_nolab.show
	gxaxis.cb_nolab.show
	gxaxis.ck_vlab.show
	gxaxis.ck_altr.show
	gxaxis.tx_fmt.show
	gxaxis.ed_fmt.show
	gxaxis.bt_fmt.show
	gxaxis.tx_ang.show
	gxaxis.cb_ang.show
	gxaxis.tx_lgap.show
	gxaxis.ed_lgap.show
	gxaxis.tx_lsize.show
	gxaxis.cb_lsize.show
	gxaxis.tx_tlclr.show
	gxaxis.cb_tlclr.show
	gxaxis.cb_tlclr.withvalue gxaxis.cb_tlclr.setvalue "@"
	gxaxis.tx_tlng.show
	gxaxis.ed_tlng.show
	gxaxis.tx_tpos.show
	gxaxis.cb_tpos.show
	gxaxis.ck_grid.show
	gxaxis.tx_gall.show
	gxaxis.cb_gall.show
	gxaxis.tx_gwd.show
	gxaxis.cb_gwd.show
	gxaxis.tx_gclr.show
	gxaxis.cb_gclr.show
	gxaxis.cb_gclr.withvalue gxaxis.cb_gclr.setvalue "@"
	gxaxis.tx_pat.show
	gxaxis.cb_pat.show
	gxaxis.tx_extend.show
	gxaxis.cb_extend.show
	gxaxis.tx_tkmode.setlabel "Major tick options"
END

SCRIPT gxmajor_hide
BEGIN
	gxaxis.tx_rule.hide
	gxaxis.ed_rule.hide
	gxaxis.bt_rule.hide
	gxaxis.tx_cstm.hide
	gxaxis.ed_cstm.hide
	gxaxis.bt_cstm.hide
	gxaxis.tx_notk.hide
	gxaxis.cb_notk.hide
	gxaxis.tx_nolab.hide
	gxaxis.cb_nolab.hide
	gxaxis.ck_vlab.hide
	gxaxis.ck_altr.hide
	gxaxis.tx_fmt.hide
	gxaxis.ed_fmt.hide
	gxaxis.bt_fmt.hide
	gxaxis.tx_ang.hide
	gxaxis.cb_ang.hide
	gxaxis.tx_lgap.hide
	gxaxis.ed_lgap.hide
	gxaxis.tx_lsize.hide
	gxaxis.cb_lsize.hide
	gxaxis.tx_tlclr.hide
	gxaxis.cb_tlclr.hide
	gxaxis.cl_tlclr.hide
	gxaxis.tx_tlng.hide
	gxaxis.ed_tlng.hide
	gxaxis.tx_tpos.hide
	gxaxis.cb_tpos.hide
	gxaxis.ck_grid.hide
	gxaxis.tx_gall.hide
	gxaxis.cb_gall.hide
	gxaxis.tx_gwd.hide
	gxaxis.cb_gwd.hide
	gxaxis.tx_gclr.hide
	gxaxis.cb_gclr.hide
	gxaxis.cl_gclr.hide
	gxaxis.tx_pat.hide
	gxaxis.cb_pat.hide
	gxaxis.tx_extend.hide
	gxaxis.cb_extend.hide
END

SCRIPT gxminor_show
BEGIN
	gxaxis.tx_mrule.show
	gxaxis.ed_mrule.show
	gxaxis.bt_mrule.show
	gxaxis.tx_mcstm.show
	gxaxis.ed_mcstm.show
	gxaxis.bt_mcstm.show
	gxaxis.tx_mnotk.show
	gxaxis.cb_mnotk.show
	gxaxis.tx_mnolab.show
	gxaxis.cb_mnolab.show
	gxaxis.ck_mvlab.show
	gxaxis.ck_maltr.show
	gxaxis.tx_mfmt.show
	gxaxis.ed_mfmt.show
	gxaxis.bt_mfmt.show
	gxaxis.tx_mang.show
	gxaxis.cb_mang.show
	gxaxis.tx_mlgap.show
	gxaxis.ed_mlgap.show
	gxaxis.tx_mlsize.show
	gxaxis.cb_mlsize.show
	gxaxis.tx_mtlclr.show
	gxaxis.cb_mtlclr.show
	gxaxis.cb_mtlclr.withvalue gxaxis.cb_mtlclr.setvalue "@"
	gxaxis.tx_mtlng.show
	gxaxis.ed_mtlng.show
	gxaxis.tx_mtpos.show
	gxaxis.cb_mtpos.show
	gxaxis.ck_mgrid.show
	gxaxis.tx_mgall.show
	gxaxis.cb_mgall.show
	gxaxis.tx_mgwd.show
	gxaxis.cb_mgwd.show
	gxaxis.tx_mgclr.show
	gxaxis.cb_mgclr.show
	gxaxis.cb_mgclr.withvalue gxaxis.cb_mgclr.setvalue "@"
	gxaxis.tx_mpat.show
	gxaxis.cb_mpat.show
	gxaxis.tx_mextend.show
	gxaxis.cb_mextend.show
	gxaxis.tx_tkmode.setlabel "Minor tick options"
END

SCRIPT gxminor_hide
BEGIN
	gxaxis.tx_mrule.hide
	gxaxis.ed_mrule.hide
	gxaxis.bt_mrule.hide
	gxaxis.tx_mcstm.hide
	gxaxis.ed_mcstm.hide
	gxaxis.bt_mcstm.hide
	gxaxis.tx_mnotk.hide
	gxaxis.cb_mnotk.hide
	gxaxis.tx_mnolab.hide
	gxaxis.cb_mnolab.hide
	gxaxis.ck_mvlab.hide
	gxaxis.ck_maltr.hide
	gxaxis.tx_mfmt.hide
	gxaxis.ed_mfmt.hide
	gxaxis.bt_mfmt.hide
	gxaxis.tx_mang.hide
	gxaxis.cb_mang.hide
	gxaxis.tx_mlgap.hide
	gxaxis.ed_mlgap.hide
	gxaxis.tx_mlsize.hide
	gxaxis.cb_mlsize.hide
	gxaxis.tx_mtlclr.hide
	gxaxis.cb_mtlclr.hide
	gxaxis.cl_mtlclr.hide
	gxaxis.tx_mtlng.hide
	gxaxis.ed_mtlng.hide
	gxaxis.tx_mtpos.hide
	gxaxis.cb_mtpos.hide
	gxaxis.ck_mgrid.hide
	gxaxis.tx_mgall.hide
	gxaxis.cb_mgall.hide
	gxaxis.tx_mgwd.hide
	gxaxis.cb_mgwd.hide
	gxaxis.tx_mgclr.hide
	gxaxis.cb_mgclr.hide
	gxaxis.cl_mgclr.hide
	gxaxis.tx_mpat.hide
	gxaxis.cb_mpat.hide
	gxaxis.tx_mextend.hide
	gxaxis.cb_mextend.hide
END

SCRIPT gxlines_show
BEGIN
	gxaxis.tx_lline.show
	gxaxis.ed_lline.show
	gxaxis.tx_llwd.show
	gxaxis.cb_llwd.show
	gxaxis.tx_llclr.show
	gxaxis.cb_llclr.show
	gxaxis.cb_llclr.withvalue gxaxis.cb_llclr.setvalue "@"
	gxaxis.tx_llpat.show
	gxaxis.cb_llpat.show
	gxaxis.tx_lextend.show
	gxaxis.cb_lextend.show
	gxaxis.tx_tkmode.setlabel "Additional lines options"
END

SCRIPT gxlines_hide
BEGIN
	gxaxis.tx_lline.hide
	gxaxis.ed_lline.hide
	gxaxis.tx_llwd.hide
	gxaxis.cb_llwd.hide
	gxaxis.tx_llclr.hide
	gxaxis.cb_llclr.hide
	gxaxis.cl_llclr.hide
	gxaxis.tx_llpat.hide
	gxaxis.cb_llpat.hide
	gxaxis.tx_lextend.hide
	gxaxis.cb_lextend.hide
END

SCRIPT gxmajor_on
BEGIN
	script gxminor_hide
	script gxlines_hide
	script gxmajor_show
END

SCRIPT gxminor_on
BEGIN
	script gxmajor_hide
	script gxlines_hide
	script gxminor_show
END

SCRIPT gxlines_on
BEGIN
	script gxmajor_hide
	script gxminor_hide
	script gxlines_show
END

//* For external use
SCRIPT gxaxis_removeTitleOpts
BEGIN
	gxaxis.gb_title.hide
	gxaxis.ed_title.hide
	gxaxis.tx_size.hide
	gxaxis.cb_size.hide
	gxaxis.tx_tclr.hide
	gxaxis.cb_tclr.hide
	gxaxis.cl_tclr.hide
	gxaxis.tx_orient.hide
	gxaxis.cb_orient.hide
	gxaxis.tx_just.hide
	gxaxis.cb_just.hide
	gxaxis.tx_align.hide
	gxaxis.cb_align.hide
	gxaxis.tx_margin.hide
	gxaxis.cb_margin.hide
	gxaxis.tx_ttlgp.hide
	gxaxis.ed_ttlgp.hide
	gxaxis.ck_box.hide
	gxaxis.tx_bclr.hide
	gxaxis.cb_bclr.hide
	gxaxis.cl_bclr.hide
	gxaxis.tx_blclr.hide
	gxaxis.cb_blclr.hide
	gxaxis.cl_blclr.hide
	gxaxis.tx_bmargin.hide
	gxaxis.cb_bmargin.hide
	gxaxis.ck_expand.hide
END

SCRIPT gxaxis_setScaleOptsToTop
BEGIN
	gxaxis.gb_option.setposition	.  10
	gxaxis.ck_range.setposition	.  30
	gxaxis.ed_rangefm.setposition	.  30
	gxaxis.tx_rangeto.setposition	.  30
	gxaxis.ed_rangeto.setposition	.  30
	gxaxis.tx_lclr.setposition	.  55
	gxaxis.cb_lclr.setposition	.  55
	gxaxis.cl_lclr.setposition	.  55
	gxaxis.tx_outergp.setposition	.  80
	gxaxis.ed_outergp.setposition	.  80
	gxaxis.ck_scaleoff.setposition	.  30
	gxaxis.ck_log.setposition  	.  55
	gxaxis.ck_rev.setposition	.  80
END

SCRIPT gxaxis_setMatrixTab
BEGIN
	script gxaxis_removeTitleOpts
	script gxaxis_setScaleOptsToTop
	gxaxis_maxes.setstring "maxes"
END

PROGRAM gxaxis_title_pr
BEGIN
   if !H(gxaxis.gb_title) {
     if gxaxis.ed_title  | gxaxis.cb_size | gxaxis.cb_tclr | 		/*
	*/ !H(gxaxis.cl_tclr) | gxaxis.cb_orient | gxaxis.cb_just | 	/*
	*/ gxaxis.cb_align | gxaxis.cb_margin | gxaxis.ck_box {
	put "xtitle("
	if gxaxis.ed_title {
		put gxaxis.ed_title
	}
	put /program gxaxis_title_opt_pr
	put ") "
     }
   }
END

PROGRAM gxaxis_title_opt_pr
BEGIN
	beginoptions
		optionarg /hidedefault gxaxis.cb_size
		if H(gxaxis.cl_tclr) {
			optionarg /hidedefault gxaxis.cb_tclr
		}
		if !H(gxaxis.cl_tclr) {
			optionarg /quoted gxaxis.cl_tclr
		}
		optionarg /hidedefault gxaxis.cb_orient
		optionarg /hidedefault gxaxis.cb_just
		optionarg /hidedefault gxaxis.cb_align
		optionarg /hidedefault gxaxis.cb_margin
		option gxaxis.ck_box
		if H(gxaxis.cl_bclr) {
			optionarg /hidedefault gxaxis.cb_bclr
		}
		if !H(gxaxis.cl_bclr) {
			optionarg /quoted gxaxis.cl_bclr
		}
		if H(gxaxis.cl_blclr) {
			optionarg /hidedefault gxaxis.cb_blclr
		}
		if !H(gxaxis.cl_blclr) {
			optionarg /quoted gxaxis.cl_blclr
		}
		optionarg /hidedefault gxaxis.cb_bmargin
		option gxaxis.ck_expand
	endoptions
END

PROGRAM gxaxis_scale_pr
BEGIN
/* xaxis scale options */
  if !D(gxaxis.gb_option) { /* If scale options are disabled then do nothing */
     if gxaxis.ck_range | gxaxis.cb_lclr | gxaxis.ed_outergp | 		/*
	*/ !H(gxaxis.cl_lclr) | gxaxis.ck_log | gxaxis.ck_rev  		/*
	*/ | gxaxis.ed_ttlgp  | gxaxis.ck_scaleoff {
	if gxaxis_maxes {
		put gxaxis_maxes "("
	}
	put "xscale("
	put /program gxaxis_scale_opt_pr
	put ")"
	if gxaxis_maxes {
		put ")"
	}
	put " "
     }
  }
END

PROGRAM gxaxis_scale_opt_pr
BEGIN
	optionarg gxaxis.ed_ttlgp
	if gxaxis.ck_range {
		require gxaxis.ed_rangefm
		require gxaxis.ed_rangeto
		put " " "range(" gxaxis.ed_rangefm " " gxaxis.ed_rangeto ")"
	}
	if H(gxaxis.cl_lclr) {
		optionarg /hidedefault gxaxis.cb_lclr
	}
	if !H(gxaxis.cl_lclr) {
		optionarg /quoted gxaxis.cl_lclr
	}
	optionarg gxaxis.ed_outergp
	option gxaxis.ck_log
	option gxaxis.ck_rev
	option gxaxis.ck_scaleoff
END

PROGRAM gxaxis_major_tick_pr
BEGIN

   /* Programming for major ticks */
   /* if any xlabel options put out "xlabel(" */
   if !D(gxaxis.ed_rule) { /* if ed_rule is disabled then do nothing */
     if gxaxis.ed_rule | gxaxis.ed_cstm | gxaxis.cb_tpos | 	/*
	*/ gxaxis.ed_tlng | gxaxis.cb_notk | gxaxis.cb_nolab | 		/*
	*/ gxaxis.ck_vlab |  gxaxis.cb_tlclr | !H(gxaxis.cl_tlclr) |	/*
	*/ gxaxis.cb_ang | gxaxis.ed_fmt | gxaxis.ed_lgap | 		/*
	*/ gxaxis.cb_lsize | gxaxis.ck_grid | gxaxis.ck_altr {
	put "xlabel("
	if gxaxis.ed_rule | gxaxis.ed_cstm {
		put /hidden gxaxis.ed_rule
		if gxaxis.ed_cstm {
			put " "
			put /hidden gxaxis.ed_cstm
		}
	}
	put /program gxaxis_major_tick_opt_pr
	put ")"
     }
   }
END
PROGRAM gxaxis_major_tick_opt_pr
BEGIN
	beginoptions
		hoptionarg /hidedefault gxaxis.cb_tpos
		hoptionarg /hidedefault gxaxis.ed_tlng
		if gxaxis.cb_notk {
			put " "
			put /hidden gxaxis.cb_notk
		}
		if gxaxis.cb_nolab {
			put " "
			put /hidden gxaxis.cb_nolab
		}
		hoption gxaxis.ck_vlab
		hoption gxaxis.ck_altr
		if !Hcc(gxaxis.cb_tlclr) & gxaxis.cb_tlclr {
			put " " "tlcolor("
			put /hidden gxaxis.cb_tlclr
			put ")"
			put " "
			put "labcolor("
			put /hidden gxaxis.cb_tlclr
			put ")"
		}
		if Hcc(gxaxis.cb_tlclr) {
			put " " `"tlcolor(""'
			put /hidden gxaxis.cl_tlclr
			put `"")"'
			put " " `"labcolor(""'
			put /hidden gxaxis.cl_tlclr
			put `"")"'
		}
		hoptionarg /hidedefault gxaxis.cb_ang
		hoptionarg /hidedefault gxaxis.ed_fmt
		hoptionarg /hidedefault gxaxis.ed_lgap
		hoptionarg /hidedefault gxaxis.cb_lsize
		hoption gxaxis.ck_grid
		if gxaxis.cb_gall {
			put " "
			put /hidden gxaxis.cb_gall
		}
		hoptionarg /hidedefault gxaxis.cb_gwd
		if !Hcc(gxaxis.cb_gclr) {
			hoptionarg /hidedefault gxaxis.cb_gclr
		}
		if Hcc(gxaxis.cb_gclr) {
			hoptionarg /quoted gxaxis.cl_gclr
		}
		hoptionarg /hidedefault gxaxis.cb_pat
		if gxaxis.cb_extend {
			put " "
			put /hidden gxaxis.cb_extend
		}
	endoptions
END

PROGRAM gxaxis_minor_tick_pr
BEGIN

   /* Programming for minor ticks */

   /* if any xlabel options put out "xlabel(" */
   if !D(gxaxis.ed_mrule) { /* if ed_mrule is disabled then do nothing */
     if gxaxis.ed_mrule | gxaxis.ed_mcstm | gxaxis.cb_mtpos |     	/*
	*/ gxaxis.ed_mtlng | gxaxis.cb_mnotk | gxaxis.cb_mnolab | 	/*
	*/ gxaxis.ck_mvlab |  gxaxis.cb_mtlclr | !H(gxaxis.cl_mtlclr) |	/*
	*/ gxaxis.cb_mang | gxaxis.ed_mfmt | gxaxis.ed_mlgap | 		/*
	*/ gxaxis.cb_mlsize | gxaxis.ck_mgrid | gxaxis.ck_maltr {
	put "xmlabel("
	if gxaxis.ed_mrule | gxaxis.ed_mcstm {
		put /hidden gxaxis.ed_mrule
		if gxaxis.ed_mcstm {
			put " "
			put /hidden gxaxis.ed_mcstm
		}
	}
	put /program gxaxis_minor_tick_opt_pr
	put ")"
     }
   }
END
PROGRAM gxaxis_minor_tick_opt_pr
BEGIN
	beginoptions
		hoptionarg /hidedefault gxaxis.cb_mtpos
		hoptionarg /hidedefault gxaxis.ed_mtlng
		if gxaxis.cb_mnotk {
			put " "
			put /hidden gxaxis.cb_mnotk
		}
		if gxaxis.cb_mnolab {
			put " "
			put /hidden gxaxis.cb_mnolab
		}
		hoption gxaxis.ck_mvlab
		hoption gxaxis.ck_maltr
		if !Hcc(gxaxis.cb_mtlclr) & gxaxis.cb_mtlclr {
			put " " "tlcolor("
			put /hidden gxaxis.cb_mtlclr
			put ")"
			put " " "labcolor("
			put /hidden gxaxis.cb_mtlclr
			put ")"
		}
		if Hcc(gxaxis.cb_mtlclr) {
			put " " `"tlcolor(""'
			put /hidden gxaxis.cl_mtlclr
			put `"")"'
			put " " `"labcolor(""'
			put /hidden gxaxis.cl_mtlclr
			put `"")"'
		}
		hoptionarg /hidedefault gxaxis.cb_mang
		hoptionarg /hidedefault gxaxis.ed_mfmt
		hoptionarg /hidedefault gxaxis.ed_mlgap
		hoptionarg /hidedefault gxaxis.cb_mlsize
		hoption gxaxis.ck_mgrid
		if gxaxis.cb_mgall {
			put " "
			put /hidden gxaxis.cb_mgall
		}
		hoptionarg /hidedefault gxaxis.cb_mgwd
		if !Hcc(gxaxis.cb_mgclr) {
			hoptionarg /hidedefault gxaxis.cb_mgclr
		}
		if Hcc(gxaxis.cb_mgclr) {
			hoptionarg /quoted gxaxis.cl_mgclr
		}
		hoptionarg /hidedefault gxaxis.cb_mpat
		if gxaxis.cb_mextend {
			put " "
			put /hidden gxaxis.cb_mextend
		}
	endoptions
END

PROGRAM gxaxis_lines_pr
BEGIN
/* xaxis line options */
  if !D(gxaxis.ed_lline) { /* if ed_lline is disabled then do nothing */
     if gxaxis.ed_lline  {
	put "xline("
	put /hidden gxaxis.ed_lline
	put /program gxaxis_lines_opt_pr
	put ")"
     }
   }
END
PROGRAM gxaxis_lines_opt_pr
BEGIN
	beginoptions
		hoptionarg /hidedefault gxaxis.cb_llwd
		if !Hcc(gxaxis.cb_llclr) {
			hoptionarg /hidedefault gxaxis.cb_llclr
		}
		if Hcc(gxaxis.cb_llclr) {
			hoptionarg /quoted gxaxis.cl_llclr
		}
		hoptionarg /hidedefault gxaxis.cb_llpat
		if gxaxis.cb_lextend {
			put " "
			put /hidden gxaxis.cb_lextend
		}
	endoptions
END

PROGRAM gxaxis_output
BEGIN
	put " " /program gxaxis_title_pr
	put " " /program gxaxis_scale_pr
	put " " /program gxaxis_major_tick_pr
	put " " /program gxaxis_minor_tick_pr
	put " " /program gxaxis_lines_pr
END
/* end */
