[rkward-cvs] SF.net SVN: rkward: [1126] trunk/rkward/rkward/plugins
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Jan 11 21:26:39 UTC 2007
Revision: 1126
http://svn.sourceforge.net/rkward/?rev=1126&view=rev
Author: tfry
Date: 2007-01-11 13:26:39 -0800 (Thu, 11 Jan 2007)
Log Message:
-----------
Wrap everything between rk.graph.on () and rk.graph.off () in try () statements
Another small correction to integer breaks method in histogram
Modified Paths:
--------------
trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php
trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php
trunk/rkward/rkward/plugins/plots/box_plot.php
trunk/rkward/rkward/plugins/plots/density_plot.php
trunk/rkward/rkward/plugins/plots/ecdf_plot.php
trunk/rkward/rkward/plugins/plots/histogram.php
trunk/rkward/rkward/plugins/plots/stripchart_plot.php
Modified: trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/distributions/plot_binomial_distribution.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -31,7 +31,7 @@
?>rk.header ("Plot binomial <? echo ($label); ?>", list ("Lowest quantile", "<? echo ($min); ?>", "Largest quantile", "<? echo ($min + ($nq * $space)); ?>", "Quantile spacing", "<? echo ($space); ?>", "Number of trials", "<? echo ($size); ?>", "Probability of success on each trial", "<? echo ($prob); ?>", "Function", "<? getRK ("function"); ?>", "Scaling", "<? echo ($log_label); ?>"));
rk.graph.on ()
-plot (<? getRK ("function"); ?> (seq (<? echo ($min); ?>, <? echo ($min + ($nq * $space)); ?>, by=<? echo ($space); ?>) , size=<? echo ($size); ?>, prob=<? echo ($prob); echo ($log); ?>))
+try (plot (<? getRK ("function"); ?> (seq (<? echo ($min); ?>, <? echo ($min + ($nq * $space)); ?>, by=<? echo ($space); ?>) , size=<? echo ($size); ?>, prob=<? echo ($prob); echo ($log); ?>)))
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/distributions/plot_chi_squared_distribution.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -9,7 +9,7 @@
?>rk.header ("Plot density <? getRK ("function"); ?>", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "Function", "<? getRK ("function"); ?>"));
rk.graph.on ()
-plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df = <? getRK ("df"); ?>), xlab=expression(chi^2))
+try (plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df = <? getRK ("df"); ?>), xlab=expression(chi^2)))
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/distributions/plot_f_distribution.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -9,7 +9,7 @@
?>rk.header ("Plot density <? getRK ("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"); ?>", "Function", "<? getRK ("function"); ?>"));
rk.graph.on ()
-plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>))
+try (plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df1 = <? getRK ("df1"); ?>, df2 = <? getRK ("df2"); ?>)))
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/distributions/plot_normal_distribution.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -9,7 +9,7 @@
?>rk.header ("Plot density <? getRK ("function"); ?>", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Mean", "<? getRK ("mean"); ?>", "Standard Deviation", "<? getRK ("sd"); ?>", "Function", "<? getRK ("function"); ?>"));
rk.graph.on ()
-plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>))
+try (plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>)))
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/distributions/plot_poisson_distribution.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -9,7 +9,7 @@
?>rk.header ("Plot density <? getRK ("function"); ?>", list ("Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Mean", "<? getRK ("mean"); ?>", "Function", "<? getRK ("function"); ?>"));
rk.graph.on ()
-plot (<? getRK ("function"); ?> (<? getRK ("min"); ?> : <? getRK ("max"); ?>, lambda = <? getRK ("mean"); ?>))
+try (plot (<? getRK ("function"); ?> (<? getRK ("min"); ?> : <? getRK ("max"); ?>, lambda = <? getRK ("mean"); ?>)))
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php
===================================================================
--- trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/distributions/plot_t_distribution.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -9,7 +9,7 @@
?>rk.header ("Plot density <? getRK ("function"); ?>", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Degrees of freedom", "<? getRK ("df"); ?>", "Function", "<? getRK ("function"); ?>"));
rk.graph.on ()
-plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df = <? getRK ("df"); ?>))
+try (plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , df = <? getRK ("df"); ?>)))
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/plots/box_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/plots/box_plot.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -10,7 +10,7 @@
?>
rk.header ("Boxplot", list ("Variable(s)", rk.get.description (<?echo ($xvarsstring); ?>, paste.sep=", ")))
rk.graph.on()
-boxplot (list (<? echo ($xvarsstring); ?>), notch = <? getRK ("notch") ?>, outline = <? getRK("outline")?>, horizontal = <? getRK("orientation") ?><? getRK ("plotoptions.code.printout"); ?>)
+try (boxplot (list (<? echo ($xvarsstring); ?>), notch = <? getRK ("notch") ?>, outline = <? getRK("outline")?>, horizontal = <? getRK("orientation") ?><? getRK ("plotoptions.code.printout"); ?>))
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/plots/density_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/density_plot.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/plots/density_plot.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -25,27 +25,27 @@
<? } ?>
rk.graph.on ()
-
+try ({
<? if ($dohdrcde_plot && $dodensity_plot) { ?>
-par(mfrow=c(1,2))
+ par(mfrow=c(1,2))
<? } ?>
<? if ($dodensity_plot) { ?>
-plot (density(<? echo ($x); ?>, bw = "<? echo ($bw); ?>", adjust = <? echo ($adjust); ?>, <? echo ($giveRkern); ?>, kern = <? echo ($kern); ?>, n = <? getRK ("n"); ?>, <? echo ($narm); ?><? getRK ("plotoptions.code.printout"); ?>))
+ plot (density(<? echo ($x); ?>, bw = "<? echo ($bw); ?>", adjust = <? echo ($adjust); ?>, <? echo ($giveRkern); ?>, kern = <? echo ($kern); ?>, n = <? getRK ("n"); ?>, <? echo ($narm); ?><? getRK ("plotoptions.code.printout"); ?>))
<? } ?>
<? if ($dorug_density) { ?>
-rug(<? echo ($x); ?>, <? getRK ("ticksize"); ?>, <? getRK ("lwd"); ?>, <? getRK ("side"); ?>, col ="<? getRK ("col_rug"); ?>")
+ rug(<? echo ($x); ?>, <? getRK ("ticksize"); ?>, <? getRK ("lwd"); ?>, <? getRK ("side"); ?>, col ="<? getRK ("col_rug"); ?>")
<? }
if ($dohdrcde_plot) { ?>
-require(hdrcde)
-hdr.den(<? echo ($x); ?><? getRK ("plotoptions.code.printout"); ?>)
+ require(hdrcde)
+ hdr.den(<? echo ($x); ?><? getRK ("plotoptions.code.printout"); ?>)
<? }
if ($dorug_hdrcde) { ?>
-rug(<? echo ($x); ?>, <? getRK ("ticksize"); ?>, <? getRK ("lwd"); ?>, <? getRK ("side"); ?>, col ="<? getRK ("col_rug"); ?>")
+ rug(<? echo ($x); ?>, <? getRK ("ticksize"); ?>, <? getRK ("lwd"); ?>, <? getRK ("side"); ?>, col ="<? getRK ("col_rug"); ?>")
<? } ?>
-
+})
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/plots/ecdf_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/ecdf_plot.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/plots/ecdf_plot.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -14,13 +14,15 @@
?>
rk.header ("Empirical Cumulative Distribution Function", list ("Variable", rk.get.description (<? echo ($x); ?>), "Minimum", rk.temp.range[1], "Maximum", rk.temp.range[2]))
rk.graph.on ()
-plot.ecdf (<? echo ($x); ?>, <? getRK ("dopoints"); ?>, <? getRK ("verticals"); ?> <? getRK ("plotoptions.code.printout"); ?>)
+try ({
+ plot.ecdf (<? echo ($x); ?>, <? getRK ("dopoints"); ?>, <? getRK ("verticals"); ?> <? getRK ("plotoptions.code.printout"); ?>)
<? if (getRK_val ("th_pnorm")) { ?>
-curve (pnorm, from=rk.temp.range[1], to=rk.temp.range[2], add=TRUE, col="<? echo ($col); ?>")
+ curve (pnorm, from=rk.temp.range[1], to=rk.temp.range[2], add=TRUE, col="<? echo ($col); ?>")
<? }
if (getRK_val ("rug")) { ?>
-rug (<? echo ($x); ?>, <? getRK ("ticksize"); ?>, <? getRK ("lwd"); ?>, <? getRK ("side"); ?>, col ="<? getRK ("col_rug"); ?>")
+ rug (<? echo ($x); ?>, <? getRK ("ticksize"); ?>, <? getRK ("lwd"); ?>, <? getRK ("side"); ?>, col ="<? getRK ("col_rug"); ?>")
<? } ?>
+})
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/plots/histogram.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/histogram.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/plots/histogram.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -14,7 +14,7 @@
$giveRkern = getRK_val ("giveRkern");
$x = getRK_val ("x");
if ($breaks == "int") {
- $breaksopt = "breaks =seq (floor (min (" . $x . "))-0.5, ceiling (max (" . $x ."))+0.5)";
+ $breaksopt = "breaks =seq (floor (min (" . $x . ", na.rm=TRUE))-0.5, ceiling (max (" . $x .", na.rm=TRUE))+0.5)";
$breaks = "Integers";
} else if (!empty ($breaks)) {
$breaksopt = "breaks=\"" . $breaks . "\"";
@@ -22,10 +22,12 @@
?>
rk.header ("Histogram", list ("Frequency", "<? echo $scale; ?>", "Breaks algorithm", <? echo ("\"" . $breaks . "\""); ?>, "Variable", rk.get.description (<? echo ($x); ?>)))
rk.graph.on ()
-hist (<? echo ($x); ?>, <? echo ($breaksopt); ?>, freq = <? echo $scale; ?><? getRK ("plotoptions.code.printout"); ?>)
+try ({
+ hist (<? echo ($x); ?>, <? echo ($breaksopt); ?>, freq = <? echo $scale; ?><? getRK ("plotoptions.code.printout"); ?>)
<? if (($scale=="FALSE") && getRK_val ("density")) { ?>
-lines(density(<? echo ($x); ?>, bw="<? echo ($bw); ?>", adjust = <? echo ($adjust); ?>, <? echo ($giveRkern); ?>, <? echo ($narm); ?>, n = <? getRK ("n"); ?>), col= "<? getRK ("col_density"); ?>")
+ lines(density(<? echo ($x); ?>, bw="<? echo ($bw); ?>", adjust = <? echo ($adjust); ?>, <? echo ($giveRkern); ?>, <? echo ($narm); ?>, n = <? getRK ("n"); ?>), col= "<? getRK ("col_density"); ?>")
<? } ?>
+})
rk.graph.off ()
<?
}
Modified: trunk/rkward/rkward/plugins/plots/stripchart_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/stripchart_plot.php 2007-01-11 21:15:37 UTC (rev 1125)
+++ trunk/rkward/rkward/plugins/plots/stripchart_plot.php 2007-01-11 21:26:39 UTC (rev 1126)
@@ -15,7 +15,7 @@
?>
rk.header ("Stripchart", list ("Variable", rk.get.description (<? echo ($x); ?>), "Method", <? echo ($method); ?>, "Jitter", <? echo ($jitter); ?>, "Plot drawn vertically", <? echo ($vertical); ?>, "Offset", <? echo ($offset); ?>))
rk.graph.on ()
-stripchart (<? echo ($x); ?> ~ (<? echo ($g); ?>), vertical=<? echo ($vertical); ?>, method = <? echo ($method); ?>, jitter = <? echo ($jitter); ?>, offset = <? echo ($offset); ?> <? getRK ("plotoptions.code.printout"); ?>)
+try (stripchart (<? echo ($x); ?> ~ (<? echo ($g); ?>), vertical=<? echo ($vertical); ?>, method = <? echo ($method); ?>, jitter = <? echo ($jitter); ?>, offset = <? echo ($offset); ?> <? getRK ("plotoptions.code.printout"); ?>))
rk.graph.off ()
<?
}
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