[rkward-cvs] SF.net SVN: rkward: [1890] trunk/rkward/rkward/plugins/distributions/clt

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed May 9 15:36:42 UTC 2007


Revision: 1890
          http://svn.sourceforge.net/rkward/?rev=1890&view=rev
Author:   tfry
Date:     2007-05-09 08:36:41 -0700 (Wed, 09 May 2007)

Log Message:
-----------
Convert CLT plugins to using snippets (.rkh files not yet converted

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.xml
    trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml

Added Paths:
-----------
    trunk/rkward/rkward/plugins/distributions/clt/plot_clt_snippets.xml

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_beta_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,21 @@
 <document>
 	<code file="plot_beta_clt.php" />
 	<help file="plot_beta_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_betaparam" label="Beta Parameters">
+				<spinbox default_precision="1" type="real" id="a" initial="2" min="0.01" label="Shape1 (a)" />
+				<spinbox default_precision="1" type="real" id="b" initial="2" min="0.01" label="Shape2 (b)" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Beta"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Beta"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Beta to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_betaparam" label="Beta Parameters">
-							<spinbox default_precision="1" type="real" id="a" initial="2" min="0.01" label="Shape1 (a)" />
-							<spinbox default_precision="1" type="real" id="b" initial="2" min="0.01" label="Shape2 (b)" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_binomial_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,84 +2,21 @@
 <document>
 	<code file="plot_binomial_clt.php" />
 	<help file="plot_binomial_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_binomparam" label="Binomial Parameters">
+				<spinbox type="integer" id="size" min="1" initial="12" label="Number of trials" />
+				<spinbox default_precision="2" type="real" id="prob" initial="0.5" min="0" max="1" label="Probability of success on each trial" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Binomial"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-
-</logic>
+		<set id="plotoptions.default_main" to="Binomial"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Binomial to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_binomparam" label="Binomial Parameters">
-							<spinbox type="integer" id="size" min="1" initial="12" label="Number of trials" />
-							<spinbox default_precision="2" type="real" id="prob" initial="0.5" min="0" max="1" label="Probability of success on each trial" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,21 @@
 <document>
 	<code file="plot_chi_squared_clt.php" />
 	<help file="plot_chi_squared_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_chisqparam" label="Chi squared Parameters">
+				<spinbox default_precision="1" type="real" min="0.01" id="df" initial="4.0" label="Degrees of freedom" />
+				<spinbox default_precision="1" type="real" min="0" id="ncp" initial="0" label="Non-centrality parameter" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Chi-Squared"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Chi-Squared"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Chi squared to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_chisqparam" label="Chi squared Parameters">
-							<spinbox default_precision="1" type="real" min="0.01" id="df" initial="4.0" label="Degrees of freedom" />
-							<spinbox default_precision="1" type="real" min="0" id="ncp" initial="0" label="Non-centrality parameter" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Added: trunk/rkward/rkward/plugins/distributions/clt/plot_clt_snippets.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_clt_snippets.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_clt_snippets.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -0,0 +1,79 @@
+<!DOCTYPE rkplugin>
+<!-- common elements for the CLT plot plugins -->
+<document>
+	<snippet id="clt_logic">
+		<set id="plotoptions.allow_log" to="false"/>
+		<set id="plotoptions.allow_type" to="false"/>
+		<set id="plotoptions.default_xlab" to="Sample Averages"/>
+		
+		<set id="normlinecol.default_color" to="red" />
+		
+		<set id="histogram_opt.varname" to="avg" />
+		<set id="histogram_opt.allow_freq" to="false" />
+		<set id="histogram_opt.allow_barlabels" to="true" />
+		<set id="histogram_opt.allow_addtoplot" to="false" />
+		
+		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
+		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
+		
+		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
+		<connect client="tab_distfunction.enabled" governor="isDist"/>
+		
+		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
+		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
+		
+		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<set id="dist_stepfun.allow_col01line" to="true"/>
+	</snippet>
+
+	<snippet id="clt_layout">
+		<tabbook>
+			<tab id="tab_plot_distrib_clt" label="Parameters" >
+				<row>
+					<column>
+						<frame label="CLT Samples" >
+							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
+							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
+						</frame>
+						<insert snippet="dist_options"/>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="hist" label="Histogram and Density"  checked="true"/>
+							<option value="dist" label="ECDF and Distribution"/>
+						</radio>
+						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
+						<frame id="frame_lineoptions" label="Normal Curve Options">
+							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
+							<dropdown id="normpointtype" label="Type of points/lines" >
+								<option value="p" label="Individual points " />
+								<option value="l" label="Lines" checked="true"/>
+								<option value="b" label="Points connected by lines (both)" />
+								<option value="o" label="Points overlaid by lines " />
+								<option value="h" label="Vertical lines (high-density)" />
+								<option value="s" label="Step-function on left edge" />
+								<option value="S" label="Step-function on right edge" />
+							</dropdown>
+							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
+						</frame>
+					</column>
+				</row>
+				<stretch/>
+				<row>
+					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
+					<preview id="preview" label="Preview"/>
+				</row>
+			</tab>
+			
+			<tab id="tab_histoptions" label="Histogram">
+				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
+			</tab>
+			
+			<tab id="tab_distfunction" label="ECDF options">
+				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
+				<stretch/>
+			</tab>
+			
+		</tabbook>
+	</snippet>
+</document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_exponential_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,82 +2,20 @@
 <document>
 	<code file="plot_exponential_clt.php" />
 	<help file="plot_exponential_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_expparam" label="Exponential Parameters">
+				<spinbox default_precision="1" type="real" id="rate" initial="1" min="0.01" label="Rate" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Exponential"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Exponential"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Exponential to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_expparam" label="Exponential Parameters">
-							<spinbox default_precision="1" type="real" id="rate" initial="1" min="0.01" label="Rate" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_f_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,85 +2,22 @@
 <document>
 	<code file="plot_f_clt.php" />
 	<help file="plot_f_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_fparam" label="F Parameters">
+				<spinbox default_precision="1" type="real" min="0.01" id="df1" initial="5" label="Numerator degrees of freedom" />
+				<spinbox default_precision="1" type="real" min="4.01" id="df2" initial="5" label="Denominator degrees of freedom" />
+				<spinbox default_precision="1" type="real" min="0" id="ncp" initial="0" label="Non-centrality parameter" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="F"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="F"/>
+	</logic>
 	<dialog label="Central Limit Theorem: F to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_fparam" label="F Parameters">
-							<spinbox default_precision="1" type="real" min="0.01" id="df1" initial="5" label="Numerator degrees of freedom" />
-							<spinbox default_precision="1" type="real" min="4.01" id="df2" initial="5" label="Denominator degrees of freedom" />
-							<spinbox default_precision="1" type="real" min="0" id="ncp" initial="0" label="Non-centrality parameter" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-				<text id="df2_gt4_err">Note: For a F distribution variance exists only when its denominator degress of freedom > 4.</text>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_gamma_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,21 @@
 <document>
 	<code file="plot_gamma_clt.php" />
 	<help file="plot_gamma_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_gammaparam" label="Gamma Parameters">
+				<spinbox default_precision="1" type="real" id="shape" initial="1" min="0.01" label="Shape" />
+				<spinbox default_precision="1" type="real" id="rate" initial="1" min="0.01" label="Rate (lambda)" label="Rate or 1/Scale" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Gamma"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Gamma"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Gamma to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_gammaparam" label="Gamma Parameters">
-							<spinbox default_precision="1" type="real" id="shape" initial="1" min="0.01" label="Shape" />
-							<spinbox default_precision="1" type="real" id="rate" initial="1" min="0.01" label="Rate (lambda)" label="Rate or 1/Scale" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_geometric_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,20 @@
 <document>
 	<code file="plot_geometric_clt.php" />
 	<help file="plot_geometric_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_geomparam" label="Geometric Parameters">
+				<spinbox default_precision="2" type="real" id="prob" initial="0.5" min="0" max="1" label="Probability of success on each trial" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Geometric"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-
-</logic>
+		<set id="plotoptions.default_main" to="Geometric"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Geometric to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_geomparam" label="Geometric Parameters">
-							<spinbox default_precision="2" type="real" id="prob" initial="0.5" min="0" max="1" label="Probability of success on each trial" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,85 +2,22 @@
 <document>
 	<code file="plot_hypergeometric_clt.php" />
 	<help file="plot_hypergeometric_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_hypergeomparam" label="Hypergeometric Parameters">
+				<spinbox type="integer" id="m" min="0" initial="12" label="Number of white balls (m)" />
+				<spinbox type="integer" id="n" min="0" initial="12" label="Number of black balls (n)" />
+				<spinbox type="integer" id="k" min="0" initial="15" label="Number of balls drawn (k)" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Hypergeometric"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-
-</logic>
+		<set id="plotoptions.default_main" to="Hypergeometric"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Hypergeometric to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_hypergeomparam" label="Hypergeometric Parameters">
-							<spinbox type="integer" id="m" min="0" initial="12" label="Number of white balls (m)" />
-							<spinbox type="integer" id="n" min="0" initial="12" label="Number of black balls (n)" />
-							<spinbox type="integer" id="k" min="0" initial="15" label="Number of balls drawn (k)" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_logistic_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,21 @@
 <document>
 	<code file="plot_logistic_clt.php" />
 	<help file="plot_logistic_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_logisparam" label="Logistic Parameters">
+				<spinbox default_precision="1" type="real" id="loc" initial="0" label="Location" />
+				<spinbox default_precision="1" type="real" id="scale" initial="1" min="0.01" label="Scale" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Logistic"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Logistic"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Logistic to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_logisparam" label="Logistic Parameters">
-							<spinbox default_precision="1" type="real" id="loc" initial="0" label="Location" />
-							<spinbox default_precision="1" type="real" id="scale" initial="1" min="0.01" label="Scale" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_lognormal_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,21 @@
 <document>
 	<code file="plot_lognormal_clt.php" />
 	<help file="plot_lognormal_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_lnormparam" label="Lognormal Parameters (in log-scale)">
+				<spinbox default_precision="1" type="real" id="mean" initial="0" label="Mean" />
+				<spinbox default_precision="2" type="real" id="sd" initial="1" min="0.01" label="Standard deviation" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Lognormal"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Lognormal"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Lognormal to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_lnormparam" label="Lognormal Parameters (in log-scale)">
-							<spinbox default_precision="1" type="real" id="mean" initial="0" label="Mean" />
-							<spinbox default_precision="2" type="real" id="sd" initial="1" min="0.01" label="Standard deviation" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,32 +2,32 @@
 <document>
 	<code file="plot_negbinomial_clt.php" />
 	<help file="plot_negbinomial_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_negbinomparam" label="Negative Binomial Parameters">
+				<spinbox type="integer" id="size_trial" min="1" initial="12" label="Target number of successful trials" />
+				<spinbox default_precision="1" type="real" id="size_disp" min="0.01" initial="12.00" label="Dispersion"/>
+				<row>
+					<column>
+						<spinbox default_precision="2" type="real" id="prob" initial="0.75" min="0" max="1" label="Success probability" />
+						<spinbox default_precision="1" type="real" id="mu" initial="4" min="0.01" label="Mean (mu)" />
+					</column>
+					<column>
+						<radio id="param" label="Type of Parameterization" >
+							<option value="pprob" label="Success probability" />
+							<option value="pmu" label="Mean (mu)" />
+						</radio>
+					</column>
+				</row>
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
+		<insert snippet="clt_logic"/>
+		<set id="dist_stepfun.default_verticals" to="false" />
 		<set id="plotoptions.default_main" to="Negative Binomial"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
 
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
-		<set id="dist_stepfun.default_verticals" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-
 		<convert id="useprob" mode="equals" sources="param.string" standard="pprob" />
 		<connect client="prob.enabled" governor="useprob" />
 		<connect client="size_trial.visible" governor="useprob" />
@@ -36,68 +36,6 @@
 		<connect client="size_disp.visible" governor="usemu" />
 	</logic>
 	<dialog label="Central Limit Theorem: Negative Binomial to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_negbinomparam" label="Negative Binomial Parameters">
-							<spinbox type="integer" id="size_trial" min="1" initial="12" label="Target number of successful trials" />
-							<spinbox default_precision="1" type="real" id="size_disp" min="0.01" initial="12.00" label="Dispersion"/>
-							<row>
-								<column>
-									<spinbox default_precision="2" type="real" id="prob" initial="0.75" min="0" max="1" label="Success probability" />
-									<spinbox default_precision="1" type="real" id="mu" initial="4" min="0.01" label="Mean (mu)" />
-								</column>
-								<column>
-									<radio id="param" label="Type of Parameterization" >
-										<option value="pprob" label="Success probability" />
-										<option value="pmu" label="Mean (mu)" />
-									</radio>
-								</column>
-							</row>
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-				<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_normal_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,21 @@
 <document>
 	<code file="plot_normal_clt.php" />
 	<help file="plot_normal_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_normalparam" label="Normal Parameters">
+				<spinbox default_precision="1" type="real" id="mean" initial="0" label="Mean" />
+				<spinbox default_precision="1" type="real" id="sd" min="0.01" initial="1" label="Standard deviation"/>
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Normal"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Normal"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Normal to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_normalparam" label="Normal Parameters">
-							<spinbox default_precision="1" type="real" id="mean" initial="0" label="Mean" />
-							<spinbox default_precision="1" type="real" id="sd" min="0.01" initial="1" label="Standard deviation"/>
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_poisson_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,20 @@
 <document>
 	<code file="plot_poisson_clt.php" />
 	<help file="plot_poisson_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_poissonparam" label="Poisson Parameters">
+				<spinbox default_precision="1" type="real" id="mean" min="0.01" initial="5" label="Mean" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Poisson"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-
+		<set id="plotoptions.default_main" to="Poisson"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Poisson to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_poissonparam" label="Poisson Parameters">
-							<spinbox default_precision="1" type="real" id="mean" min="0.01" initial="5" label="Mean" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-				<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_t_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,84 +2,21 @@
 <document>
 	<code file="plot_t_clt.php" />
 	<help file="plot_t_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_tparam" label="t Parameters">
+				<spinbox default_precision="1" type="real" id="df" min="2.01" initial="3" label="Degrees of freedom" />
+				<spinbox default_precision="1" type="real" id="ncp" initial="0" label="Non-centrality parameter" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="t"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="t"/>
+	</logic>
 	<dialog label="Central Limit Theorem: t to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_tparam" label="t Parameters">
-								<spinbox default_precision="1" type="real" id="df" min="2.01" initial="3" label="Degrees of freedom" />
-								<spinbox default_precision="1" type="real" id="ncp" initial="0" label="Non-centrality parameter" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-				<text id="var_gt2_warn">Note: For a t distribution variance exists only when its degress of freedom > 2.</text>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_uniform_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,21 @@
 <document>
 	<code file="plot_uniform_clt.php" />
 	<help file="plot_uniform_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_unifparam" label="Uniform Parameters">
+				<spinbox default_precision="1" type="real" id="llim" initial="0" label="Minimum" />
+				<spinbox default_precision="1" type="real" id="ulim" initial="1" label="Maximum" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Uniform"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Uniform"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Uniform to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_unifparam" label="Uniform Parameters">
-							<spinbox default_precision="1" type="real" id="llim" initial="0" label="Minimum" />
-							<spinbox default_precision="1" type="real" id="ulim" initial="1" label="Maximum" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_weibull_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,83 +2,21 @@
 <document>
 	<code file="plot_weibull_clt.php" />
 	<help file="plot_weibull_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_weibullparam" label="Weibull Parameters">
+				<spinbox default_precision="1" type="real" id="shape" initial="2" min ="0.01" label="Shape" />
+				<spinbox default_precision="1" type="real" id="scale" initial="1" min ="0.01" label="Scale" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Weibull"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-</logic>
+		<set id="plotoptions.default_main" to="Weibull"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Weibull to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_weibullparam" label="Weibull Parameters">
-							<spinbox default_precision="1" type="real" id="shape" initial="2" min ="0.01" label="Shape" />
-							<spinbox default_precision="1" type="real" id="scale" initial="1" min ="0.01" label="Scale" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml	2007-05-09 14:48:41 UTC (rev 1889)
+++ trunk/rkward/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml	2007-05-09 15:36:41 UTC (rev 1890)
@@ -2,84 +2,21 @@
 <document>
 	<code file="plot_wilcoxon_clt.php" />
 	<help file="plot_wilcoxon_clt.rkh" />
+	<snippets>
+		<snippet id="dist_options">
+			<frame id="frame_wilcoxonparam" label="Wilcoxon Parameters">
+				<spinbox type="integer" id="nm" min="1" initial="4" label="Number of Observations in first sample (m)" />
+				<spinbox type="integer" id="nn" min="1" initial="6" label="Number of Observations in second sample (n)" />
+			</frame>
+		</snippet>
+		<include file="plot_clt_snippets.xml"/>
+	</snippets>
 	<logic>
-		<set id="plotoptions.allow_log" to="false"/>
-		<set id="plotoptions.allow_type" to="false"/>
-		<set id="plotoptions.default_main" to="Wilcoxon"/>
-		<set id="plotoptions.default_xlab" to="Sample Averages"/>
-
-		<set id="normlinecol.default_color" to="red" />
-
-		<set id="histogram_opt.varname" to="avg" />
-		<set id="histogram_opt.allow_freq" to="false" />
-		<set id="histogram_opt.allow_barlabels" to="true" />
-		<set id="histogram_opt.allow_addtoplot" to="false" />
-
-		<convert id="isHistogram" sources="function.string" mode="equals" standard="hist"/>
-		<connect client="tab_histoptions.enabled" governor="isHistogram"/>
-
-		<convert id="isDist" sources="function.string" mode="equals" standard="dist"/>
-		<connect client="tab_distfunction.enabled" governor="isDist"/>
-
-		<connect client="normpointtype.enabled" governor="drawnorm.state"/>
-		<connect client="normlinecol.color.enabled" governor="drawnorm.state"/>
-
-		<set id="dist_stepfun.allow_addtoplot" to="false" />
+		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<set id="dist_stepfun.allow_col01line" to="true"/>
-
-</logic>
+		<set id="plotoptions.default_main" to="Wilcoxon"/>
+	</logic>
 	<dialog label="Central Limit Theorem: Wilcoxon to Normal" >
-		<tabbook>
-			<tab id="tab_plot_distrib_clt" label="Parameters" >
-				<row>
-					<column>
-						<frame label="CLT Samples" >
-							<spinbox type="integer" min = "1" id="nAvg" initial="10" label="Samples for Average" />
-							<spinbox type="integer" min = "10" id="nDist" initial="1000" label="Samples for distribution" />
-						</frame>
-						<frame id="frame_wilcoxonparam" label="Wilcoxon Parameters">
-							<spinbox type="integer" id="nm" min="1" initial="4" label="Number of Observations in first sample (m)" />
-							<spinbox type="integer" id="nn" min="1" initial="6" label="Number of Observations in second sample (n)" />
-						</frame>
-					</column>
-					<column>
-						<radio id="function" label="Choose type of function plot" >
-							<option value="hist" label="Histogram and Density"  checked="true"/>
-							<option value="dist" label="ECDF and Distribution"/>
-						</radio>
-						<checkbox id="scalenorm" label="Use normalised random variable" value="1" value_unchecked="0"/>
-						<frame id="frame_lineoptions" label="Normal Curve Options">
-							<checkbox id="drawnorm" label="Draw normal curve" value="1" value_unchecked="0" checked="true"/>
-							<dropdown id="normpointtype" label="Type of points/lines" >
-								<option value="p" label="Individual points " />
-								<option value="l" label="Lines" checked="true"/>
-								<option value="b" label="Points connected by lines (both)" />
-								<option value="o" label="Points overlaid by lines " />
-								<option value="h" label="Vertical lines (high-density)" />
-								<option value="s" label="Step-function on left edge" />
-								<option value="S" label="Step-function on right edge" />
-							</dropdown>
-							<embed id="normlinecol" component="rkward::color_chooser" label="Color" />
-						</frame>
-					</column>
-				</row>
-			<stretch/>
-				<row>
-					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
-					<preview id="preview" label="Preview"/>
-				</row>
-			</tab>
-
-			<tab id="tab_histoptions" label="Histogram">
-				<embed id="histogram_opt" component="rkward::histogram_options" label="Histogram Options"/>
-			</tab>
-
-			<tab id="tab_distfunction" label="ECDF options">
-				<embed id="dist_stepfun" component="rkward::plot_stepfun_options" label=""/>
-				<stretch/>
-			</tab>
-
-		</tabbook>
+		<insert snippet="clt_layout"/>
 	</dialog>
 </document>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list