[rkward-cvs] SF.net SVN: rkward: [1257] trunk/rkward/rkward/plugins

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Jan 31 15:24:05 UTC 2007


Revision: 1257
          http://svn.sourceforge.net/rkward/?rev=1257&view=rev
Author:   tfry
Date:     2007-01-31 07:24:04 -0800 (Wed, 31 Jan 2007)

Log Message:
-----------
New and improved distribution plots by Prasenjit Kapat
Modifications:
- disable GUI elements that do not apply for selected type of plot
- store most settings in PHP variables to avoid duplicate lookup via getRK
- cleaner R code (TRUE/FALSE instead of 1/0, log.p where applicable)

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/Makefile.am
    trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_f_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_t_distribution.xml
    trunk/rkward/rkward/plugins/under_development.pluginmap

Added Paths:
-----------
    trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.xml
    trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.php
    trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.xml

Modified: trunk/rkward/rkward/plugins/Makefile.am
===================================================================
--- trunk/rkward/rkward/plugins/Makefile.am	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/Makefile.am	2007-01-31 15:24:04 UTC (rev 1257)
@@ -140,10 +140,36 @@
 	distributions/sf_test.xml \
 	distributions/ad_test.php \
 	distributions/cvm_test.php \
+	distributions/plot_wilcoxon_distribution.php \
+	distributions/plot_gamma_distribution.php \
+	distributions/plot_gamma_distribution.xml \
+	distributions/plot_geometric_distribution.php \
+	distributions/plot_geometric_distribution.xml \
+	distributions/plot_hypergeometric_distribution.php \
+	distributions/plot_hypergeometric_distribution.xml \
+	distributions/plot_negbinomial_distribution.php \
+	distributions/plot_negbinomial_distribution.xml \
+	distributions/plot_beta_distribution.xml \
+	distributions/plot_cauchy_distribution.xml \
+	distributions/plot_exponential_distribution.xml \
+	distributions/plot_lognormal_distribution.xml \
+	distributions/plot_tukey_distribution.php \
+	distributions/plot_uniform_distribution.php \
+	distributions/plot_beta_distribution.php \
+	distributions/plot_cauchy_distribution.php \
+	distributions/plot_logistic_distribution.xml \
+	distributions/plot_exponential_distribution.php \
+	distributions/plot_lognormal_distribution.php \
+	distributions/plot_weibull_distribution.xml \
+	distributions/plot_wilcoxon_distribution.xml \
+	distributions/plot_logistic_distribution.php \
 	distributions/wilcoxon_probabilities.php \
 	distributions/wilcoxon_probabilities.xml \
 	distributions/wilcoxon_quantiles.php \
-	distributions/wilcoxon_quantiles.xml
+	distributions/wilcoxon_quantiles.xml \
+	distributions/plot_weibull_distribution.php \
+	distributions/plot_tukey_distribution.xml \
+	distributions/plot_uniform_distribution.xml
 
 pluginsXwritetabledir = $(kde_datadir)/rkward/writetable
 dist_pluginsXwritetable_DATA = \
@@ -205,6 +231,13 @@
 	00saveload/save/save/code.php \
 	00saveload/save/save/description.xml
 
+pluginsX00saveloadXimportdir = $(kde_datadir)/rkward/00saveload/import
+dist_pluginsX00saveloadXimport_DATA = \
+	00saveload/import/import_spss.xml \
+	00saveload/import/import_spss.php
+
+pluginsXanalysisdir = $(kde_datadir)/rkward/analysis
+pluginsXanalysisXansariUbradleydir = $(kde_datadir)/rkward/analysis/ansari_bradley
 pluginsXwilcoxondir = $(kde_datadir)/rkward/wilcoxon
 dist_pluginsXwilcoxon_DATA = \
 	wilcoxon/wilcoxon_test.xml \

Added: trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,63 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+	$fun = getRK_val ("function");
+	$log_option = "";
+	if ($fun == "dbeta") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+  $a = getRK_val ("a");
+  $b = getRK_val ("b");
+  $ncp = getRK_val ("ncp");
+
+	if ($final) { ?>
+rk.header ("Beta <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Shape1", "<? echo ($a); ?>", "Shape2", "<? echo ($b); ?>", "Non-cetrality parameter", "<? echo ($ncp); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, shape1 = <? echo ($a); ?>, shape2 = <? echo ($b); ?>, ncp = <? echo ($ncp); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_beta_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,44 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot beta probabilities" plugin--><document>
+	<code file="plot_beta_distribution.php" />
+	<dialog label="Plot Beta probabilities" >
+		<tabbook>
+			<tab label="Plot Beta probabilities" >
+				<row>
+					<column>
+						<row>
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
+						</row>
+						<row>
+							<frame label="Range" >
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="0.00" min="0" max="1" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="1.00" min="0" max="1" label="Upper quantile" />
+							</frame>
+						</row>
+						<row>
+							<frame label="Parameters">
+							<spinbox max_precision="2" default_precision="2" type="real" id="a" initial="2" min="0.01" label="Shape1 (a)" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="b" initial="2" min="0.01" label="Shape2 (b)" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="ncp" initial="0" min="0" label="Non-centrality parameter (ncp)" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dbeta" label="Plot density function" />
+							<option value="pbeta" label="Plot distribution" />
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pbeta" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,36 +6,57 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "dbinom") {
 		$label = "mass";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	$min = getRK_val ("min");
 	$size = getRK_val ("size");
 	$prob = getRK_val ("prob");
 	$max = getRK_val ("max");
+
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
 
-?>rk.header ("Binomial <? echo ($label); ?> function", list ("Lower quantile", "<? getRK ("min"); ?>", "Upper quantile", "<? getRK ("max"); ?>", "Number of trials", "<? echo ($size); ?>", "Probability of success on each trial", "<? echo ($prob); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Binomial <? echo ($label); ?> function", list ("Lower quantile", "<? echo ($min); ?>", "Upper quantile", "<? echo ($max); ?>", "Number of trials", "<? echo ($size); ?>", "Probability of success on each trial", "<? echo ($prob); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, size = <? getRK ("size"); ?>, prob=<? echo ($prob); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, size = <? echo ($size); ?>, prob=<? echo ($prob); ?><? echo ($log_option); ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -24,9 +24,14 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pbinom" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Added: trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,62 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+	$fun = getRK_val ("function");
+	$log_option = "";
+	if ($fun == "dcauchy") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+	$loc = getRK_val ("loc");
+	$scale = getRK_val ("scale");
+
+	if ($final) { ?>
+rk.header ("Cauchy <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Location", "<? echo ($loc); ?>", "Scale", "<? echo ($scale); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, location = <? echo ($loc); ?>, scale = <? echo ($scale); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_cauchy_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,43 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot cauchy probabilities" plugin--><document>
+	<code file="plot_cauchy_distribution.php" />
+	<dialog label="Plot Cauchy probabilities" >
+		<tabbook>
+			<tab label="Plot Cauchy probabilities" >
+				<row>
+					<column>
+						<row>
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
+						</row>
+						<row>
+							<frame label="Range" >
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="-3.29" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="3.29" label="Upper quantile" />
+							</frame>
+						</row>
+						<row>
+							<frame label="Parameters">
+							<spinbox max_precision="2" default_precision="2" type="real" id="loc" initial="0" label="Location" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="scale" initial="1" min="0.01" label="Scale" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dcauchy" label="Plot density function" />
+							<option value="pcauchy" label="Plot distribution" />
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pcauchy" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,33 +6,57 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
 
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "dchisq") {
 		$label = "density";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+  $ncp = getRK_val ("ncp");
+	$df = getRK_val ("df");
 
-?>rk.header ("Chisquare <? echo ($label); ?> function", list ("Number of Observations", "<? getRK ("n"); ?>", "Lower quantile", "<? getRK ("min"); ?>", "Upper quantile", "<? getRK ("max"); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "Non-centrality", "<? getRK ("ncp"); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Chisquare <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>", "Upper quantile", "<? echo ($max); ?>", "Degrees of freedom", "<? echo ($df); ?>", "Non-centrality", "<? echo ($ncp); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? getRK ("min"); ?>, to=<? getRK ("max"); ?>, n=<? getRK ("n"); ?>))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, df = <? echo ($df); ?>, ncp = <? echo ($ncp); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -30,9 +30,14 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pchisq" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Added: trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,61 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+	$fun = getRK_val ("function");
+	$log_option = "";
+	if ($fun == "dexp") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+	$rate = getRK_val ("rate");
+
+	if ($final) { ?>
+rk.header ("Exponential <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Rate", "<? echo ($rate); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, rate = <? echo ($rate); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_exponential_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,42 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot exponential probabilities" plugin--><document>
+	<code file="plot_exponential_distribution.php" />
+	<dialog label="Plot Exponential probabilities" >
+		<tabbook>
+			<tab label="Plot Exponential probabilities" >
+				<row>
+					<column>
+						<row>
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
+						</row>
+						<row>
+							<frame label="Range" >
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="0" min="0" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="10" label="Upper quantile" />
+							</frame>
+						</row>
+						<row>
+							<frame label="Parameters">
+							<spinbox max_precision="2" default_precision="2" type="real" id="rate" initial="1" min="0.01" label="Rate" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dexp" label="Plot density function" />
+							<option value="pexp" label="Plot distribution" />
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pexp" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,33 +6,58 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
 
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "df") {
 		$label = "density";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+  $ncp = getRK_val ("ncp");
+	$df1 = getRK_val ("df1");
+	$df2 = getRK_val ("df2");
 
-?>rk.header ("F <? echo ($label); ?> function", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Numerator degrees of freedom", "<? getRK ("df1"); ?>", "Denominator degrees of freedom", "<? getRK ("df2"); ?>", "Non-centrality", "<? getRK ("ncp"); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("F <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>", "Upper quantile", "<? echo ($max); ?>", "Numerator degrees of freedom", "<? echo ($df1); ?>", "Denominator degrees of freedom", "<? echo ($df2); ?>", "Non-centrality", "<? echo ($ncp); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>, ncp = <? getRK ("ncp"); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? getRK ("min"); ?>, to=<? getRK ("max"); ?>, n=<? getRK ("n"); ?>))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, df1 = <? echo ($df1); ?>, df2 = <? echo ($df2); ?>, ncp = <? echo ($ncp); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_f_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_f_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_f_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -11,8 +11,8 @@
 						</row>
 						<row>
 							<frame label="Range" >
-								<spinbox max_precision="4" default_precision="2" type="real" min="0.001" id="min" initial="0.001" label="Minimum" />
-								<spinbox max_precision="4" default_precision="2" type="real" min="0.001" id="max" initial="25" label="Maximum" />
+								<spinbox max_precision="4" default_precision="2" type="real" min="0.001" id="min" initial="0.001" label="Lower quantile" />
+								<spinbox max_precision="4" default_precision="2" type="real" min="0.001" id="max" initial="25" label="Upper quantile" />
 							</frame>
 						</row>
 						<frame label="Parameters">
@@ -20,9 +20,9 @@
 								<spinbox max_precision="2" default_precision="2" type="real" min="0.01" id="df1" initial="5" label="Numerator degrees of freedom" />
 								<spinbox max_precision="2" default_precision="2" type="real" min="0.01" id="df2" initial="5" label="Denominator degrees of freedom" />
 							</row>
-							<row>
+<!-- 							<row> -->
 								<spinbox max_precision="2" default_precision="0" type="real" min="0" id="ncp" initial="0" label="Non-centrality parameter" />
-							</row>
+<!-- 							</row> -->
 						</frame>
 					</column>
 					<column>
@@ -33,9 +33,14 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pf" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,33 +6,57 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
 
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
-	if ($fun == "dchisq") {
-		$label = "mass";
+	$log_option = "";
+	if ($fun == "dgamma") {
+		$label = "density";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+	$shape = getRK_val ("shape");
+	$rate = getRK_val ("rate");
 
-?>rk.header ("Plot density <? getRK ("function"); ?>", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>","Maximum", "<? getRK ("max"); ?>", "Shape", "<? getRK ("shape"); ?>", "Rate", "<? getRK ("rate"); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Gamma <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Shape", "<? echo ($shape); ?>", "Rate", "<? echo ($rate); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , shape = <? getRK ("shape"); ?>, rate = <? getRK ("rate"); ?>)))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, shape = <? echo ($shape); ?>, rate = <? echo ($rate); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_gamma_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -1,23 +1,25 @@
 <!DOCTYPE rkplugin>
 <!--This is the simple "Plot gamma probabilities" plugin--><document>
 	<code file="plot_gamma_distribution.php" />
-	<dialog label="Plot gamma probabilities" >
+	<dialog label="Plot Gamma probabilities" >
 		<tabbook>
-			<tab label="Plot gamma probabilities" >
+			<tab label="Plot Gamma probabilities" >
 				<row>
 					<column>
 						<row>
-							<spinbox max_precision="2" default_precision="2" type="real" id="n" initial="100" label="Number of Observations" />
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
 						</row>
 						<row>
 							<frame label="Range" >
-								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="0" label="Minimum" />
-								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="4.6" label="Maximum" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="0.01" min="0.01" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="4.6" min="0.02" label="Upper quantile" />
 							</frame>
 						</row>
 						<row>
-							<spinbox max_precision="2" default_precision="2" type="real" id="shape" initial="1" label="a (shape)" />
-							<spinbox max_precision="2" default_precision="2" type="real" id="rate" initial="1" label="lambda (rate)" label="rate or 1/scale" />
+							<frame label="Parameters">
+							<spinbox max_precision="2" default_precision="2" type="real" id="shape" initial="1" min="0.01" label="Shape (a)" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="rate" initial="1" min="0.01" label="Rate (lambda)" label="rate or 1/scale" />
+						</frame>
 						</row>
 					</column>
 					<column>
@@ -25,10 +27,17 @@
 							<option value="dgamma" label="Plot density function" />
 							<option value="pgamma" label="Plot distribution" />
 						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pgamma" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,20 +6,38 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "dgeom") {
 		$label = "mass";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	$min = getRK_val ("min");
 	$prob = getRK_val ("prob");
@@ -27,14 +45,16 @@
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
 
-?>rk.header ("Geometric <? echo ($label); ?> function", list ("Lower quantile", "<? getRK ("min"); ?>", "Upper quantile", "<? getRK ("max"); ?>", "Probability of success on each trial", "<? echo ($prob); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Geometric <? echo ($label); ?> function", list ("Lower quantile", "<? echo ($min); ?>", "Upper quantile", "<? echo ($max); ?>", "Probability of success on each trial", "<? echo ($prob); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, prob=<? echo ($prob); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, prob=<? echo ($prob); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_geometric_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -23,9 +23,14 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pgeom" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,34 +6,57 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "dhyper") {
 		$label = "mass";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	$min = getRK_val ("min");
 	$max = getRK_val ("max");
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
+	$n = getRK_val ("n");
+	$m = getRK_val ("m");
+	$k = getRK_val ("k");
 
-?>rk.header ("Hypergeometric <? echo ($label); ?> function", list ("Lower quantile", "<? getRK ("min"); ?>", "Upper quantile", "<? getRK ("max"); ?>", "Number of white balls", "<? getRK ("m"); ?>",  "Number of black balls", "<? getRK ("n"); ?>", "Number of balls drawn", "<? getRK ("k"); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Hypergeometric <? echo ($label); ?> function", list ("Lower quantile", "<? echo ($min); ?>", "Upper quantile", "<? echo ($max); ?>", "Number of white balls", "<? echo ($m); ?>",  "Number of black balls", "<? echo ($n); ?>", "Number of balls drawn", "<? echo ($k); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, m = <? getRK ("m"); ?>, n = <? getRK ("n"); ?>, k = <? getRK ("k"); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, m = <? echo ($m); ?>, n = <? echo ($n); ?>, k = <? echo ($k); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_hypergeometric_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -25,9 +25,14 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="phyper" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Added: trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,62 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+	$fun = getRK_val ("function");
+	$log_option = "";
+	if ($fun == "dlogis") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+	$loc = getRK_val ("loc");
+	$scale = getRK_val ("scale");
+
+	if ($final) { ?>
+rk.header ("Logistic <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Location", "<? echo ($loc); ?>", "Scale", "<? echo ($scale); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, location = <? echo ($loc); ?>, scale = <? echo ($scale); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_logistic_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,43 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot logistic probabilities" plugin--><document>
+	<code file="plot_logistic_distribution.php" />
+	<dialog label="Plot Logistic probabilities" >
+		<tabbook>
+			<tab label="Plot Logistic probabilities" >
+				<row>
+					<column>
+						<row>
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
+						</row>
+						<row>
+							<frame label="Range" >
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="-3.29" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="3.29" label="Upper quantile" />
+							</frame>
+						</row>
+						<row>
+							<frame label="Parameters">
+							<spinbox max_precision="2" default_precision="2" type="real" id="loc" initial="0" label="Location" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="scale" initial="1" min="0.01" label="Scale" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dlogis" label="Plot density function" />
+							<option value="plogis" label="Plot distribution" />
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="plogis" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Added: trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,61 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+	$fun = getRK_val ("function");
+	$log_option = "";
+	if ($fun == "dlnorm") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+	$sd = getRK_val ("sd");
+  $mean = getRK_val ("mean");
+	if ($final) { ?>
+rk.header ("Lognormal <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Mean", "<? echo ($mean); ?>", "Standard deviation", "<? echo ($sd); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, meanlog = <? echo ($mean); ?>, sdlog = <? echo ($sd); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_lognormal_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,43 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot lognormal probabilities" plugin--><document>
+	<code file="plot_lognormal_distribution.php" />
+	<dialog label="Plot Lognormal probabilities" >
+		<tabbook>
+			<tab label="Plot Lognormal probabilities" >
+				<row>
+					<column>
+						<row>
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
+						</row>
+						<row>
+							<frame label="Range" >
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="0.01" min="0.01" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="3.29" min="0.02" label="Upper quantile" />
+							</frame>
+						</row>
+						<row>
+							<frame label="Parameters (on log scale)">
+							<spinbox max_precision="2" default_precision="2" type="real" id="mean" initial="0" label="Mean" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="sd" initial="1" min="0.01" label="Standard deviation" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dlnorm" label="Plot density function" />
+							<option value="plnorm" label="Plot distribution" />
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="plnorm" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,20 +6,38 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "dnbinom") {
 		$label = "mass";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	$min = getRK_val ("min");
 	$max = getRK_val ("max");
@@ -38,14 +56,16 @@
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
 
-?>rk.header ("Negative Binomial <? echo ($label); ?> function", list ("Lower quantile", "<? getRK ("min"); ?>", "Upper quantile", "<? getRK ("max"); ?>", "Target for number of successful trials", "<? echo ($size); ?>", "<? echo ($paramLabel); ?>", "<? echo ($paramVal); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Negative Binomial <? echo ($label); ?> function", list ("Lower quantile", "<? echo ($min); ?>", "Upper quantile", "<? echo ($max); ?>", "Target for number of successful trials", "<? echo ($size); ?>", "<? echo ($paramLabel); ?>", "<? echo ($paramVal); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, size = <? getRK ("size"); ?><? echo ($paramTag); ?><? echo ($paramVal); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, size = <? echo ($size); ?><? echo ($paramTag); ?><? echo ($paramVal); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_negbinomial_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -35,9 +35,18 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pnbinom" />
+		<connect client="lower.enabled" governor="dodist" />
+		<convert id="useprob" mode="equals" sources="param.string" standard="pprob" />
+		<connect client="prob.enabled" governor="useprob" />
+		<convert id="usemu" mode="equals" sources="param.string" standard="pmu" />
+		<connect client="mu.enabled" governor="usemu" />
+	</logic>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -1,38 +1,60 @@
 <?
-	function preprocess () {
-	}
+function preprocess () {
+}
 
-	function calculate () {
-	}
+function calculate () {
+}
 
-	function printout () {
+function printout () {
+	doPrintout (true);
+}
 
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "dnorm") {
 		$label = "density";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+	$sd = getRK_val ("sd");
 
-?>rk.header ("Normal <? echo ($label); ?> function", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Mean", "<? getRK ("mean"); ?>", "Standard Deviation", "<? getRK ("sd"); ?>", "Non-centrality", "<? getRK ("ncp"); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Normal <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>", "Upper quantile", "<? echo ($max); ?>", "Mean", "<? echo ($mean); ?>", "Standard Deviation", "<? echo ($sd); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? getRK ("min"); ?>, to=<? getRK ("max"); ?>, n=<? getRK ("n"); ?>))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, mean = <? echo ($mean); ?>, sd = <? echo ($sd); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -1,23 +1,25 @@
 <!DOCTYPE rkplugin>
 <!--This is the simple "Plot normal probabilities" plugin--><document>
 	<code file="plot_normal_distribution.php" />
-	<dialog label="Plot normal probabilities" >
+	<dialog label="Plot Normal probabilities" >
 		<tabbook>
-			<tab label="Plot normal probabilities" >
+			<tab label="Plot Normal probabilities" >
 				<row>
 					<column>
 						<row>
-							<spinbox max_precision="2" default_precision="2" type="real" id="n" initial="100" label="Number of Observations" />
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
 						</row>
 						<row>
 							<frame label="Range" >
-								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="-3.291" label="Minimum" />
-								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="3.291" label="Maximum" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="-3.29" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="3.29" label="Upper quantile" />
 							</frame>
 						</row>
 						<row>
-							<spinbox max_precision="2" default_precision="2" type="real" id="mean" initial="0" label="mu (mean)" />
-							<spinbox max_precision="2" default_precision="2" type="real" id="sd" min="0.01" initial="1" label="sigma (standard deviation)" label="standard deviation" />
+							<frame label="Parameter">
+							<spinbox max_precision="2" default_precision="2" type="real" id="mean" initial="0" label="Mean (mu)" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="sd" min="0.01" initial="1" label="Standard deviation (sigma)" label="standard deviation" />
+						</frame>
 						</row>
 					</column>
 					<column>
@@ -28,9 +30,14 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pnorm" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,34 +6,55 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "dpois") {
 		$label = "mass";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	$min = getRK_val ("min");
 	$max = getRK_val ("max");
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
+	$mean = getRK_val ("mean");
 
-?>rk.header ("Poisson <? echo ($label); ?> function", list ("Lower quantile", "<? getRK ("min"); ?>", "Upper quantile", "<? getRK ("max"); ?>", "Mean", "<? getRK ("mean"); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Poisson <? echo ($label); ?> function", list ("Lower quantile", "<? echo ($min); ?>", "Upper quantile", "<? echo ($max); ?>", "Mean", "<? echo ($mean); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, lambda = <? getRK ("mean"); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? getRK ("min"); ?>, to=<? getRK ("max"); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, lambda = <? echo ($mean); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($max - $min + 1); ?>, type="p"))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -24,9 +24,14 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="ppois" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Modified: trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -6,33 +6,57 @@
 	}
 
 	function printout () {
+	doPrintout (true);
+}
 
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
 	$fun = getRK_val ("function");
+	$log_option = "";
 	if ($fun == "dt") {
 		$label = "density";
 		$lower_tag = "";
 		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
 	} else {
 		$label = "distribution";
 		if (getRK_val("lower") == "1") {
-			$lower_tag = ", lower.tail = 1";
+			$lower_tag = ", lower.tail = TRUE";
 			$tail_tag = ", \"Tail\",\"Lower\"";
 		} else {
-			$lower_tag = ", lower.tail = 0";
+			$lower_tag = ", lower.tail = FALSE";
 			$tail_tag = ", \"Tail\",\"Upper\"";
 		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
 	}
 	if (getRK_val ("log") == "1") $log_label="logarithmic";
 	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+  $ncp = getRK_val ("ncp");
+	$df = getRK_val ("df");
 
-?>rk.header ("t <? echo ($label); ?> function", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "Non-centrality", "<? getRK ("ncp"); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? getRK ("function"); ?>"));
+	if ($final) { ?>
+rk.header ("Student t <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Minimum", "<? echo ($min); ?>", "Maximum", "<? echo ($max); ?>", "Degrees of freedom", "<? echo ($df); ?>", "Non-centrality", "<? echo ($ncp); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
 
 rk.graph.on ()
-try (plot (function (x) <? getRK ("function"); ?> (x, df = <? getRK ("df"); ?>, ncp = <? getRK ("ncp"); ?>, log = <? getRK ("log"); ?><? echo ($lower_tag); ?>), from=<? getRK ("min"); ?>, to=<? getRK ("max"); ?>, n=<? getRK ("n"); ?>))
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, df = <? echo ($df); ?>, ncp = <? echo ($ncp); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
 rk.graph.off ()
-<?
-	}
-
-	function cleanup () {
-	}
+<? }
+}
 ?>

Modified: trunk/rkward/rkward/plugins/distributions/plot_t_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_t_distribution.xml	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/distributions/plot_t_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -2,9 +2,9 @@
 <!--This is the simple "Plot t probabilities" plugin-->
 <document>
 	<code file="plot_t_distribution.php" />
-	<dialog label="Plot t probabilities" >
+	<dialog label="Plot Student T probabilities" >
 		<tabbook>
-			<tab label="Plot t probabilities" >
+			<tab label="Plot Student T probabilities" >
 				<row>
 					<column>
 						<row>
@@ -12,8 +12,8 @@
 						</row>
 						<row>
 							<frame label="Range" >
-								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="-12.924" label="Minimum" />
-								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="12.924" label="Maximum" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="-12.924" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="12.924" label="Upper quantile" />
 							</frame>
 						</row>
 						<row>
@@ -31,9 +31,14 @@
 						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
 						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
 						<stretch/>
+						<preview id="preview"/>
 					</column>
 				</row>
 			</tab>
 		</tabbook>
 	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pt" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
 </document>

Added: trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,64 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+// 	$fun = getRK_val ("function");
+	$fun = "ptukey";
+	$log_option = "";
+	if ($fun == "dtukey") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+	$df = getRK_val ("df");
+	$nmeans = getRK_val ("nmeans");
+	$nranges = getRK_val ("nranges");
+
+	if ($final) { ?>
+rk.header ("Tukey <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Sample size for range", "<? echo ($nmeans); ?>", "Degreed of freedom for s", "<? echo ($df); ?>", "Number of groups", "<? echo ($nranges); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, nmeans = <? echo ($nmeans); ?>, df = <? echo ($df); ?>, nranges = <? echo ($nranges); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_tukey_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,46 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot tukey probabilities" plugin--><document>
+	<code file="plot_tukey_distribution.php" />
+	<dialog label="Plot Studentized Range (Tukey) probabilities" >
+		<tabbook>
+			<tab label="Plot Studentized Range (Tukey) probabilities" >
+				<row>
+					<column>
+						<row>
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
+						</row>
+						<row>
+							<frame label="Range" >
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="0" min="0" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="4" label="Upper quantile" />
+							</frame>
+						</row>
+						<row>
+							<frame label="Parameters">
+							<spinbox type="integer" id="nmeans" min="1" initial="30" label="Sample size for range (same for each group)" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="df" initial="5" min="0" label="Degrees of freedom for s" />
+							<spinbox type="integer" id="nranges" min="1" initial="1" label="Number of groups whose maximum range is considered" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dtukey" label="Plot density function" />
+							<option value="ptukey" label="Plot distribution" checked="true"/>
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="disablefunction" mode="range" sources="n.int" max="0" />
+		<connect client="function.enabled" governor="disablefunction" />
+		<convert id="dodist" mode="equals" sources="function.string" standard="ptukey" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Added: trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,60 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+	$fun = getRK_val ("function");
+	$log_option = "";
+	if ($fun == "dunif") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+
+	if ($final) { ?>
+rk.header ("Uniform <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Domain", "[<? echo ($llim); ?>, <? echo ($ulim); ?>]", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, min = <? echo ($llim); ?>, max = <? echo ($ulim); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_uniform_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,43 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot uniform probabilities" plugin--><document>
+	<code file="plot_uniform_distribution.php" />
+	<dialog label="Plot Uniform probabilities" >
+		<tabbook>
+			<tab label="Plot Uniform probabilities" >
+				<row>
+					<column>
+						<row>
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
+						</row>
+						<row>
+							<frame label="Range" >
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="-1" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="2" label="Upper quantile" />
+							</frame>
+						</row>
+						<row>
+							<frame label="Parameters">
+							<spinbox max_precision="2" default_precision="2" type="real" id="llim" initial="0" label="Lower limit" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="ulim" initial="1" label="Upper limit" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dunif" label="Plot density function" />
+							<option value="punif" label="Plot distribution" />
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="punif" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Added: trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,62 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+	$fun = getRK_val ("function");
+	$log_option = "";
+	if ($fun == "dweibull") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+	$n = getRK_val ("n");
+	$min = getRK_val ("min");
+	$max = getRK_val ("max");
+	$scale = getRK_val ("scale");
+	$shape = getRK_val ("shape");
+
+	if ($final) { ?>
+rk.header ("Weibull <? echo ($label); ?> function", list ("Number of Observations", "<? echo ($n); ?>", "Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "Shape", "<? echo ($shape); ?>", "Scale", "<? echo ($scale); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, shape = <? echo ($shape); ?>, scale = <? echo ($scale); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_weibull_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,43 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot weibullprobabilities" plugin--><document>
+	<code file="plot_weibull_distribution.php" />
+	<dialog label="Plot Weibull probabilities" >
+		<tabbook>
+			<tab label="Plot Weibull probabilities" >
+				<row>
+					<column>
+						<row>
+							<spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" />
+						</row>
+						<row>
+							<frame label="Range" >
+								<spinbox max_precision="2" default_precision="2" type="real" id="min" initial="0" min="0" label="Lower quantile" />
+								<spinbox max_precision="2" default_precision="2" type="real" id="max" initial="5" min="0" label="Upper quantile" />
+							</frame>
+						</row>
+						<row>
+							<frame label="Parameter">
+							<spinbox max_precision="2" default_precision="2" type="real" id="shape" initial="2" min ="0.01" label="Shape" />
+							<spinbox max_precision="2" default_precision="2" type="real" id="scale" initial="1" min ="0.01" label="Scale" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dweibull" label="Plot density function" />
+							<option value="pweibull" label="Plot distribution" />
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pweibull" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Added: trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.php	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,64 @@
+<?
+	function preprocess () {
+	}
+
+	function calculate () {
+	}
+
+	function printout () {
+	doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+	cleanup ();
+}
+
+function doPrintout ($final) {
+
+	$fun = getRK_val ("function");
+	$log_option = "";
+	if ($fun == "dwilcox") {
+		$label = "density";
+		$lower_tag = "";
+		$tail_tag = "";
+		if (getRK_val ("log")) $log_option = ", log=TRUE";
+	} else {
+		$label = "distribution";
+		if (getRK_val("lower") == "1") {
+			$lower_tag = ", lower.tail = TRUE";
+			$tail_tag = ", \"Tail\",\"Lower\"";
+		} else {
+			$lower_tag = ", lower.tail = FALSE";
+			$tail_tag = ", \"Tail\",\"Upper\"";
+		}
+		if (getRK_val ("log")) $log_option = ", log.p=TRUE";
+	}
+/*	$min = getRK_val ("min");
+	$max = getRK_val ("max");*/
+	$nm = getRK_val ("nm");
+	$nn = getRK_val ("nn");
+	$min = 0;
+	$max = $nn * $nm;
+	$n = $max - $min + 1;
+	if (getRK_val ("log") == "1") $log_label="logarithmic";
+	else $log_label="normal";
+
+	if ($final) { ?>
+rk.header ("Wilcoxon <? echo ($label); ?> function", list ("Lower quantile", "<? echo ($min); ?>","Upper quantile", "<? echo ($max); ?>", "First sample size", "<? echo ($nm); ?>", "Second sample size", "<? echo ($nn); ?>", "Scaling", "<? echo ($log_label); ?>"<? echo ($tail_tag); ?>, "Function", "<? echo ($fun); ?>"));
+
+rk.graph.on ()
+<? }
+?>
+try (plot (function (x) <? echo ($fun); ?> (x, m = <? echo ($nm); ?>, n = <? echo ($nn); ?><? echo ($log_option) ?><? echo ($lower_tag); ?>), from=<? echo ($min); ?>, to=<? echo ($max); ?>, n=<? echo ($n); ?>, type="p"))
+
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.xml
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/distributions/plot_wilcoxon_distribution.xml	2007-01-31 15:24:04 UTC (rev 1257)
@@ -0,0 +1,41 @@
+<!DOCTYPE rkplugin>
+<!--This is the simple "Plot wilcoxon probabilities" plugin-->
+<document>
+	<code file="plot_wilcoxon_distribution.php" />
+	<dialog label="Plot Wilcoxon Rank Sum statistic probabilities" >
+		<tabbook>
+			<tab label="Plot Wilcoxon Rank Sum statistic probabilities" >
+				<row>
+					<column>
+<!--						<row>
+							<frame label="Range" >
+								<spinbox default_precision="0" type="integer" id="min" initial="0" min = "0" label="Lower quantile" />
+								<spinbox type="integer" id="max" initial="6" min="0" label="Upper quantile" />
+							</frame>
+						</row>-->
+						<row>
+							<frame label="Parameters">
+							<spinbox type="integer" id="nm" min="1" initial="2" label="Number of Observations in first sample" />
+							<spinbox type="integer" id="nn" min="1" initial="3" label="Number of Observations in second sample" />
+						</frame>
+						</row>
+					</column>
+					<column>
+						<radio id="function" label="Choose type of function plot" >
+							<option value="dwilcox" label="Plot density function" />
+							<option value="pwilcox" label="Plot distribution" />
+						</radio>
+						<checkbox id="log" label="Logarithmic" value="1" value_unchecked="0"/>
+						<checkbox id="lower" label="Lower Tail" value="1" value_unchecked="0" checked="true"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+	<logic>
+		<convert id="dodist" mode="equals" sources="function.string" standard="pwilcox" />
+		<connect client="lower.enabled" governor="dodist" />
+	</logic>
+</document>

Modified: trunk/rkward/rkward/plugins/under_development.pluginmap
===================================================================
--- trunk/rkward/rkward/plugins/under_development.pluginmap	2007-01-30 23:16:45 UTC (rev 1256)
+++ trunk/rkward/rkward/plugins/under_development.pluginmap	2007-01-31 15:24:04 UTC (rev 1257)
@@ -20,10 +20,19 @@
 		<component type="standard" id="cor_graph" file="plots/cor_graph.xml" label="Correlation Matrix Plot" />
 		<component type="standard" id="scatterplot_matrix" file="plots/scatterplot_matrix.xml" label="Scatterplot Matrix" />
 
-		<component type="standard" id="plot_negbinomial_distribution" file="distributions/plot_negbinomial_distribution.xml" label="Plot negative binomial distribution" />
-		<component type="standard" id="plot_hypergeometric_distribution" file="distributions/plot_hypergeometric_distribution.xml" label="Plot hypergeometric distribution" />
-		<component type="standard" id="plot_geometric_distribution" file="distributions/plot_geometric_distribution.xml" label="Plot geometric distribution" />
-		<component type="standard" id="plot_gamma_distribution" file="distributions/plot_gamma_distribution.xml" label="Plot Gamma distribution" />
+					<component type="standard" id="plot_beta_distribution" file="distributions/plot_beta_distribution.xml" label="Plot Beta distribution" />
+					<component type="standard" id="plot_cauchy_distribution" file="distributions/plot_cauchy_distribution.xml" label="Plot Cauchy distribution" />
+					<component type="standard" id="plot_exponential_distribution" file="distributions/plot_exponential_distribution.xml" label="Plot Exponential distribution" />
+					<component type="standard" id="plot_gamma_distribution" file="distributions/plot_gamma_distribution.xml" label="Plot Gamma distribution" />
+					<component type="standard" id="plot_geometric_distribution" file="distributions/plot_geometric_distribution.xml" label="Plot Geometric distribution" />
+					<component type="standard" id="plot_hypergeometric_distribution" file="distributions/plot_hypergeometric_distribution.xml" label="Plot Hypergeometric distribution" />
+					<component type="standard" id="plot_logistic_distribution" file="distributions/plot_logistic_distribution.xml" label="Plot Logistic distribution" />
+					<component type="standard" id="plot_lognormal_distribution" file="distributions/plot_lognormal_distribution.xml" label="Plot Lognormal distribution" />
+					<component type="standard" id="plot_negbinomial_distribution" file="distributions/plot_negbinomial_distribution.xml" label="Plot Negative Binomial distribution" />
+					<component type="standard" id="plot_tukey_distribution" file="distributions/plot_tukey_distribution.xml" label="Plot Studentized Range (Tukey) distribution" />
+					<component type="standard" id="plot_uniform_distribution" file="distributions/plot_uniform_distribution.xml" label="Plot Uniform distribution" />
+					<component type="standard" id="plot_weibull_distribution" file="distributions/plot_weibull_distribution.xml" label="Plot Weibull distribution" />
+					<component type="standard" id="plot_wilcoxon_distribution" file="distributions/plot_wilcoxon_distribution.xml" label="Plot Wilcoxon Rank Sum distribution" />
 	</components>
 
 	<hierarchy>
@@ -48,26 +57,55 @@
 			<entry component="cor_graph" />
 			<entry component="scatterplot_matrix" />
 		</menu>
-		<menu id="distributions" label="Distributions" index="7">
-			<menu id="univariate_continuous_distributions" label="Univariate continuous distributions" index="1">
-				<menu id="gamma_distribution" label="Gamma Distribution" index="5">
-					<entry component="gamma_quantiles" label="Gamma quantiles" index="1"/>
-					<entry component="gamma_probabilities" label="Gamma probabilities" index="0"/>
-					<entry component="plot_gamma_distribution" label="Plot Gamma distribution" index="2"/>
+
+				<menu id="distributions" label="Distributions" index="7">
+					<menu id="univariate_continuous_distributions" label="Univariate continuous distributions" index="1">
+						<menu id="beta_distribution" label="Beta Distribution" index="0">
+								<entry component="plot_beta_distribution" label="Plot Beta distribution" index="2"/>
+						</menu>
+						<menu id="cauchy_distribution" label="Cauchy Distribution" index="1">
+								<entry component="plot_cauchy_distribution" label="Plot Cauchy distribution" index="2"/>
+						</menu>
+						<menu id="exponential_distribution" label="Exponential Distribution" index="3">
+								<entry component="plot_exponential_distribution" label="Plot Exponential distribution" index="2"/>
+						</menu>
+						<menu id="gamma_distribution" label="Gamma Distribution" index="5">
+								<entry component="plot_gamma_distribution" label="Plot Gamma distribution" index="2"/>
+						</menu>
+						<menu id="logistic_distribution" label="Logistic Distribution" index="7">
+								<entry component="plot_logistic_distribution" label="Plot Logistic distribution" index="2"/>
+						</menu>
+						<menu id="log_normal_distribution" label="Log Normal Distribution" index="8">
+								<entry component="plot_lognormal_distribution" label="Plot Lognormal distribution" index="2"/>
+						</menu>
+						<menu id="tukey_distribution" label="Studentized Range Distribution (Tukey)" index="11">
+								<entry component="plot_tukey_distribution" label="Plot Studentized Range (Tukey) distribution" index="2"/>
+						</menu>
+						<menu id="uniform_distribution" label="Uniform Distribution" index="12">
+								<entry component="plot_uniform_distribution" label="Plot Uniform distribution" index="2"/>
+						</menu>
+						<menu id="weibull_distribution" label="Weibull Distribution" index="13">
+								<entry component="plot_weibull_distribution" label="Plot Weibull distribution" index="2"/>
+						</menu>
+					</menu>
+
+					<menu id="univariate_discrete_distributions" label="Univariate discrete distributions" index="2">
+						<menu id="geom_distribution" label="Geometric Distribution" index="1">
+								<entry component="plot_geometric_distribution" label="Plot Geometric distribution" index="2"/>
+						</menu>
+						<menu id="hypergeometric_distribution" label="Hypergeometric Distribution" index="2">
+								<entry component="plot_hypergeometric_distribution" label="Plot Hypergeometric distribution" index="2"/>
+						</menu>
+						<menu id="negative_binomial_distribution" label="Negative Binomial Distribution" index="3">
+								<entry component="plot_negbinomial_distribution" label="Plot Negative Binomial distribution" index="2"/>
+						</menu>
+						<menu id="wilcoxon_distribution" label="Wilcoxon Rank Sum Distribution" index="5">
+								<entry component="wilcoxon_quantiles" label="Wilcoxon Rank Sum quantiles" index="1"/>
+								<entry component="wilcoxon_probabilities" label="Wilcoxon Rank Sum probabilities" index="0"/>
+								<entry component="plot_wilcoxon_distribution" label="Plot Wilcoxon Rank Sum distribution" index="2"/>
+						</menu>
+					</menu>
 				</menu>
-			</menu>
-			<menu id="univariate_discrete_distributions" label="Univariate discrete distributions" index="2">
-				<menu id="geom_distribution" label="Geometric Distribution" index="1">
-					<entry component="plot_geometric_distribution" label="Plot geometric distribution" index="2"/>
-				</menu>
-				<menu id="hypergeometric_distribution" label="Hypergeometric Distribution" index="2">
-					<entry component="plot_hypergeometric_distribution" label="Plot hypergeometric distribution" index="2"/>
-				</menu>
-				<menu id="negative_binomial_distribution" label="Negative Binomial Distribution" index="3">
-					<entry component="plot_negbinomial_distribution" label="Plot negative binomial distribution" index="2"/>
-				</menu>
-			</menu>
-		</menu>
 	</hierarchy>
 
 	<context id="x11">
@@ -83,4 +121,4 @@
 		</menu>
 	</context>
 </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