⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addplot.idlg

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 IDLG
📖 第 1 页 / 共 5 页
字号:
/*
    addplot.idlg

*!  VERSION 1.0.4 01jun2005

	// SCRIPTS and PROGRAMS for external use

	* SCRIPT  addplot_disable
	* SCRIPT  addplot_enable
	* PROGRAM addplot_output

	******
		The following tabs are identical. Changes made to one
		must be	made to ALL

		 plot1.idlg
		 plot2.idlg
		 plot3.idlg
		 plot4.idlg
		 addplot.idlg  ** the POSTINT SCRIPT for this tab is different
	------
*/

SCRIPT addplot_PREINIT
BEGIN
	create BOOLEAN addplot_is_pc_type
	create BOOLEAN addplot_is_weights
	create BOOLEAN addplot_uses_scatter_weights
END

SCRIPT addplot_POSTINIT
BEGIN
	addplot.cb_type.withvalue addplot.cb_type.setvalue "@"
	addplot.cb_msize_wgt.additem "Weighted"

// Global system lists used in plot tabs and elsewhere
// These are expected to be the last items in this list.
	_dc_symbolsizes.Arrpush "weight"
	_dv_symbolsizes.Arrpush "weight"
END

DEFINE vnwd  130
DEFINE vnsep +150

DIALOG addplot, tabtitle("Add plot")
BEGIN
  TEXT     tx_type		_lft	_top	180	.,	///
	label("Plot type to add:")
  LISTBOX  cb_type		@	_ss	@	315,	///
	contents(addplot_graph_type)				///
	values(addplot_graph_type_val)				///
	onselchangelist(addplot_change)

  TEXT     tx_x			200	_top	vnwd	.,	///
	label("X variable:")
  VARNAME  vn_x			@	_ss	@	.,	///
	label("X variable")
  TEXT     tx_y			vnsep	_top	vnwd	.,

  VARNAME  vn_y			@	_ss	@	.,	///
	label("Y variable")
  TEXT     tx_if		vnsep	_top	vnwd	.,	///
	label("If: (expression)")
  EXP      ex_if		@	_ss	249	.,	///
	label("Create...")
  CHECKBOX ck_sort		200	_ms	vnwd	.,	///
	label("Sort on X") option(sort)

  CHECKBOX ck_xaxis2		200	75	vnwd	.,	///
	label("Second X axis") option(xaxis(2))
  CHECKBOX ck_yaxis2		350	95	vnwd	.,	///
	label("Second Y axis") option(yaxis(2))
  TEXT     tx_x2		200	55	vnwd	.,	///
  	label("X-2 variable:")
  VARNAME  vn_x2		200	75	vnwd	.,	///
  	label("X-2 variable:")
  TEXT     tx_y2		350	55	vnwd	.,	///
	label("Y variable: (lower)")
DEFINE y @y
  VARNAME  vn_y2		350	75	@	.,	///
	label("Y variable (lower)")

  CHECKBOX ck_inrange		500	55	249	.,	///
	onclickon(script addplot_inrange_on)			///
	onclickoff(script addplot_inrange_off)			///
  	label("Use a range of observations")
  TEXT     tx_from		500	75	30	.,	///
	label("From:")
  SPINNER  sp_from		+32  	@	_spwd	.,	///
	min(1) default(1) max(c(N))
  TEXT     tx_to		_spsep	@	14	.,	///
  		label("to:")
  SPINNER  sp_to		+16	@	_spwd	.,	///
	min(1) default(c(N)) max(c(N))

  GROUPBOX gb_generic		200	100	550	70,	///
	label("Median-band")

  CHECKBOX ck_mband		210	120	vnwd	.,	///
	label("Number of bands") 				///
	onclickon(addplot.sp_mband.enable)			///
	onclickoff(addplot.sp_mband.disable)
  SPINNER  sp_mband		230	140	_spwd	.,	///
	default(10) min(1) max(10000000) option(bands)

  CHECKBOX ck_mpoints		350	120	300	.,	///
	label("Number of points between knots")			///
	onclickon(addplot.sp_mpoints.enable)			///
	onclickoff(addplot.sp_mpoints.disable)
  SPINNER  sp_mpoints		370	140	_spwd	.,	///
	default(10) min(1) max(10000000) option(n)

/**** BEGIN -- lowess options ****/
  // share gb_generic here
  CHECKBOX ck_mean		210	120	530	.,	///
	label("Running-mean smoothing") option(mean)
  CHECKBOX ck_nowieght		210	140	530	.,	///
  	option(noweight)					///
	label("Prevents use of Cleveland's tricube weighting function")
  CHECKBOX ck_logit		210	160	530	.,	///
  	option(logit) label("Transform smoothed yvar into logit")
  CHECKBOX ck_noadjust		210	180	530	.,	///
  	option(noadjust)					///
	label("Adjust mean of the smoothed yvar to equal the mean of yvar")
  EDIT     ed_bandwidth		210	210	_en7wd	.,	///
	default(0.8) numonly option(bwidth)
  TEXT     tx_bandwidth		_en7sep	210	vnwd	.,	///
	label("Bandwidth")
/**** END   -- lowess options ****/

/**** BEGIN -- kdensity options ****/
  // share gb_generic here
  TEXT     tx_function		210	120	530	.,	///
	label("Kernel function:")
  COMBOBOX cb_function		210	140	_vnwd	.,	///
	dropdownlist						///
	contents(kernel_function)				///
	values(kernel_function_val)
  CHECKBOX ck_kernelwidth	210	170	530	.,	///
	label("Override optimal width (smoothing parameter)")	///
	onclickon(script addplot_kernelwidth_on)			///
	onclickoff(script addplot_kernelwidth_off)
  EDIT     ed_kernelwidth	210	190	_en7wd	.,	///
  	option(width)
  TEXT     tx_kernelwidth	_en7sep	190	200	.,	///
	label("Halfwidth of the kernel")

  SPINNER  sp_kerneleval	210	220	_en7wd	.,	///
	default(300) min(1) max(10000000) option(n)
  TEXT     tx_kerneleval	_en7sep	220	400	.,	///
	label("Number of points at which the estimate is evaluated")
/**** END   -- kernel options ****/

/**** BEGIN -- Fit/fitci options ****/
  GROUPBOX gb_fit		200	100	550	115,	///
	label("Quadratic prediction w/ci")

  CHECKBOX ck_fitrange		215	125	60  	.,	///
	onclickon(script addplot_fitrange_on)			///
	onclickoff(script addplot_fitrange_off)			///
	label("Range")

  EDIT     ed_fitfrom		+65	125	_spwd	., default(.)
  TEXT     tx_fitto		_spsep	125	14	., label("to:")
  EDIT     ed_fitto		+16	125	_spwd	., default(.)

  RADIO    rb_predpoints	490	118	20	., 	///
  	first onclickon(program addplot_predpoints_on)
  RADIO    rb_predx		490	138	249	.,	///
  	onclickon(script addplot_predx_on)			///
	label("Predict at X values") last option(atobs)

  SPINNER  sp_predpoints	510	118	_spwd	.,	///
	default(100) min(1) max(10000000) option(n)
  TEXT     tx_predpoints	_spsep	118	150	.,	///
	label("Prediction points")

  TEXT     tx_ci_src		210	163	65	.,	///
	label("CI source:") right

  COMBOBOX cb_ci_src		+70	163	99	.,	///
	dropdownlist 						///
	contents(addplot_ci_source) values(addplot_ci_source_values)

  TEXT     tx_fitplot		379	163	65	.,	///
	label("Fit plot:") right
  COMBOBOX cb_fitplot		+70	163	99	.,	///
	option(fitplot)						///
	dropdownlist						///
	onselchangelist(addplot_fitplots_change)			///
	contents(addplot_fitplots) values(addplot_fitplots_values)

  TEXT     tx_regress_opt	560	163	75	.,	///
	label("Regress opts:") right
  EDIT     ed_regress_opt	+80	163	99	.,	///
	label("Regress options") option(estopts)

  TEXT     tx_level		210	188	65	.,	///
	label("CI level:") right
  SPINNER  sp_level		+70	188	99	.,	///
	default(95) min(10) max(99) option(level)

  TEXT     tx_ciplot		379	188	65	.,	///
	label("CI plot:") right
  COMBOBOX cb_ciplot		+70	188	99	.,	///
	option(ciplot)						///
	dropdownlist 						///
	onselchangelist(addplot_ciplots_change)			///
	contents(addplot_ciplots) values(addplot_ciplots_values)

  TEXT     tx_pred_opt		560	188	75	.,	///
	label("Predict opts:") right
  EDIT     ed_pred_opt		+80	188	99	.,	///
	label("Predict optins") option(predopts)

  TEXT     tx_ecommand		203	125	75	.,	///
  	label("Estimation:") right
  COMBOBOX cb_ecommand		280	125	99	.,	///
  	dropdownlist contents(addplot_estimation_command_list) 	///
  	option(estcmd) default(regress)
/**** END   -- fit & fit with ci options ****/

/**** BEGIN -- Scatter options ****/
  GROUPBOX gb_marker		200	120	550	_ht11,	///
	label("Markers")

  TEXT     tx_msymbol		210	140	65	.,	///
	label("Symbol:") right
  COMBOBOX cb_msymbol		280	140	99	.,	///
	option(msymbol)						///
	dropdownlist						///
	contents(symbols)

  TEXT     tx_msize		392	140	65	.,	///
	label("Size:") right
  COMBOBOX cb_msize_wgt		+70	140	99	.,	///
	option(msize)						///
	dropdownlist 						///
	contents(symbolsizes) onselchange(program addplot_weight_check)
  COMBOBOX cb_msize		@	@	@	.,	///
	option(msize)						///
	dropdownlist 						///
	contents(symbolsizes)
  TEXT     tx_mcolor		570	140	65	.,	///
	label("Color:") right
  COMBOBOX cb_mcolor		+70	140	82	.,	///
	option(mcolor)						///
	dropdownlist						///
	contents(colors) onselchangelist(addplot_color_mcolor)
  COLOR    cl_mcolor		+85	140	_btwd	.,	///
	option(mcolor)

  CHECKBOX ck_mlabel		210	170	530	85,	///
	label("Marker labels") groupbox				///
	onclickon(script addplot_mlabel_1_enable)			///
	onclickoff(script addplot_mlabel_1_disable)

  TEXT     tx_mlabel		220	195	58	.,	///
	label("Variable:") right

  VARNAME  vn_mlabel		+63	195	99	.,	///
	label("Marker labels variable") option(mlabel)

  TEXT     tx_mlsize		220	225	58	.,	///
	label("Size:") right
  COMBOBOX cb_mlsize		+63	225	99	.,	///
	option(mlabsize) 					///
	dropdownlist						///
	contents(textsizes)

  TEXT     tx_mlcolor		399	195	58	.,	///
	label("Color:") right
  COMBOBOX cb_mlcolor		+63	195	82	.,	///
	option(mlabcolor)					///
	dropdownlist						///
	contents(colors) onselchangelist(addplot_color_mlcolor)
  COLOR    cl_mlcolor		+85	195	_btwd	.,	///
	option(mlabcolor)

  TEXT     tx_mlposition	399	225	58	.,	///
	label("Position:") right
  COMBOBOX cb_mlposition	+63	225	99	.,	///
	option(mlabposition) 					///
	dropdownlist						///
	contents(clockpos)

  TEXT     tx_weightvar		362	170	95	.,	///
	label("Weight variable:") right
  VARNAME  vn_weightvar		+100	170	99	.,	///
	label("Weight variable")

  TEXT     tx_orientation	570	170	65	.,	///
	label("Orientation:") right
  COMBOBOX cb_orientation	+70	170	99	.,	///
	contents(addplot_orientation_contents)			///
	values(addplot_orientation_values)			///
	dropdownlist
/**** END   -- Scatter options  ****/

/**** BEGIN -- Line options  ****/
  GROUPBOX gb_line		200	120	550	80,	///
  		label("Lines")
  TEXT     tx_clcolor		210	140	65	.,	///
	label("Line color:") 					///
	right
  COMBOBOX cb_clcolor		+70	140	82	.,	///
	dropdownlist option(lcolor)				///
	contents(colors) onselchangelist(addplot_color_clcolor)
  COLOR    cl_clcolor		+85	140	_btwd	.,	///
	option(lcolor)

  TEXT     tx_connect		210	170	65	.,	///
	label("Type:") right
  COMBOBOX cb_connect		+70	170	99	.,	///
	option(connect)						///
	dropdownlist 						///
	contents(connecttypes)

  TEXT     tx_clwidth		392	140	65	.,	///
  		label("Width:") right
  COMBOBOX cb_clwidth		+70	140	99	.,	///
	dropdownlist						///
	contents(linewidths) option(lwidth)

  TEXT     tx_clpattern		392	170	65	.,	///
	label("Pattern:") right
  COMBOBOX cb_clpattern		+70	170	99	.,	///
	dropdownlist 						///
 	contents(linepatterns) option(lpattern)
/**** END   -- Line options ****/

/**** BEGIN -- Area options ****/
  GROUPBOX gb_common		200	120	550	80,	///
	label("Area")

  TEXT     tx_blcolor		210	140	65	.,	///
	label("Line color:") 					///
	right

  COMBOBOX cb_blcolor		+70	140	82	.,	///
	option(lcolor)						///
	dropdownlist						///
	contents(colors) onselchangelist(addplot_color_blcolor)
  COLOR    cl_blcolor		+85	140	_btwd	.,	///
	option(lcolor)

  TEXT     tx_bfcolor		210	170	65	.,	///
	label("Fill color:") 					///
	right
  COMBOBOX cb_bfcolor		+70 	170	82	.,	///
	option(fcolor)						///
	dropdownlist						///
	contents(colors) onselchangelist(addplot_color_bfcolor)
  COLOR    cl_bfcolor		+85	170	_btwd	.,	///
	option(fcolor)

  TEXT     tx_blwidth		392	140	65	.,	///
	label("Line width:") right
  COMBOBOX cb_blwidth		+70	140	99	.,	///
	dropdownlist						///
	contents(linewidths) option(lwidth)

  TEXT     tx_blpattern		392	170	65	.,	///
	label("Ln. pattern:") right
  TEXT     tx_barwidth		392	170	65	.,	///
	label("Bar width:") right
  COMBOBOX cb_blpattern		+70	170	99	.,	///
	dropdownlist 						///
	contents(linepatterns) option(lpattern)
  EDIT     en_barwidth		@	170	99	.,	///
	default(1) numonly option(barwidth)

  TEXT     tx_base		570	140	65	.,	///
	label("Baseline:") right
  EDIT     en_base		+70	140	99	.,	///
	default(0) numonly option(base)
/**** END   -- Area options ****/

/**** BEGIN -- pcarrow options ****/
  TEXT     tx_barbsize		210	225	65	.,	///
  	label("Barbsize:") right
  COMBOBOX cb_barbsize		280	225	99	.,	///
  	option(barbsize) dropdownlist contents(symbolsizes)

  CHECKBOX ck_headlabel		590	310	139	.,	///
  	label("Label head of arrow") option(headlabel)
/**** END   -- pcarrow options ****/

/**** BEGIN -- Histogram options ****/
  TEXT     tx_histtype		210	120	140	.,	///
  	label("Histogram type:")
  COMBOBOX cb_histtype		210	140	140	.,	///
  	dropdownlist						///
  	contents(addplot_histogram_list) values(addplot_histogram_list_values)
  GROUPBOX gb_datatype		210	175	140	70,	///
  	label("Type of data")
  RADIO    rb_continuous	220	195	120	.,	///
  	first label("Continuous data")				///
  	onclickon(program addplot_datatype_ckeck)
  RADIO    rb_discrete		220	215	120	.,	///
  	last label("Discrete data") option(discrete)		///
  	onclickon(program addplot_datatype_ckeck)

  SPINNER  sp_gap		386	125	_spwd	.,	///
  	default(0) min(0) max(100) option(gap)
  TEXT     tx_gap		_spsep  125	100	.,	///
  	label("Gap")

  EDIT     ed_datamin		500	125	_en7wd	.,	///
  	option(start)
  TEXT     tx_datamin		_en7sep 125	150	.,	///
  	label("Theoretical data minimum")

  CHECKBOX ck_num_of_bins	386	205	350	.,	///
    	onclickon(script addplot_num_of_bins_on)			///
  	onclickoff(script addplot_num_of_bins_off)		///
  	label("Override number of bins used with continuous data")
  SPINNER  sp_num_of_bins	386	225	_spwd	.,	///
  	default(10) min(1) max(1000) option(bin)

  CHECKBOX ck_width_of_bins	386	155	350	.,	///
  	onclickon(script addplot_width_of_bins_on)		///
  	onclickoff(script addplot_width_of_bins_off)		///
	label("Override width of bins")
  EDIT     ed_width_of_bins	386	175	_en7wd	.,	///
  	option(width)
/**** END   -- Histogram options ****/
END

PROGRAM addplot_weight_check
BEGIN
	if addplot_uses_scatter_weights {
		if addplot.cb_msize_wgt.iseq("weight") {
			call addplot_is_weights.settrue
			call addplot.ck_mlabel.hide
			call addplot.tx_mlabel.hide
			call addplot.vn_mlabel.hide
			call addplot.tx_mlsize.hide
			call addplot.cb_mlsize.hide
			call addplot.tx_mlcolor.hide
			call addplot.cb_mlcolor.hide
			call addplot.cl_mlcolor.hide
			call addplot.tx_mlposition.hide
			call addplot.cb_mlposition.hide
			call addplot.gb_marker.setposition . . . 80
			call addplot.tx_weightvar.show
			call addplot.vn_weightvar.show
			exit
		}
		call script addplot_scatter_show_options
		call addplot.cb_msize.hide
		call addplot.cb_msize_wgt.show
		call addplot_is_weights.setfalse
		if addplot.cb_type.iseq("rscatter") {
			call addplot.gb_marker.setposition . . . 170
		}
		if ! addplot.cb_type.iseq("rscatter") {
			call addplot.gb_marker.setposition . . . 140
		}
		call addplot.tx_weightvar.hide
		call addplot.vn_weightvar.hide
	}
END

SCRIPT addplot_set_scatter_weights_on
BEGIN
	addplot_uses_scatter_weights.settrue
	addplot.cb_msize.hide
	addplot.cb_msize_wgt.show
	addplot.cb_msize_wgt.withvalue addplot.cb_msize_wgt.setvalue "@"
END

PROGRAM addplot_datatype_ckeck
BEGIN
	if addplot.rb_discrete {
		call addplot.ck_num_of_bins.hide
		call addplot.sp_num_of_bins.hide
		call addplot.ck_width_of_bins.enable
		if addplot.ck_width_of_bins {
			call addplot.ed_width_of_bins.enable
		}
	}
	if addplot.rb_continuous {
		call addplot.ck_num_of_bins.show
		call addplot.sp_num_of_bins.show
		if addplot.ck_num_of_bins {
			call addplot.ck_width_of_bins.disable
		}
		if addplot.ck_width_of_bins {
			call addplot.ck_num_of_bins.setoff
		}
	}
END

SCRIPT addplot_num_of_bins_on
BEGIN
	addplot.sp_num_of_bins.enable
	addplot.ck_width_of_bins.disable

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -