[rkward-cvs] SF.net SVN: rkward: [1225] trunk/rkward/rkward/plugins/plots
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Jan 25 19:14:11 UTC 2007
Revision: 1225
http://svn.sourceforge.net/rkward/?rev=1225&view=rev
Author: tfry
Date: 2007-01-25 11:14:11 -0800 (Thu, 25 Jan 2007)
Log Message:
-----------
more previews
Modified Paths:
--------------
trunk/rkward/rkward/plugins/plots/ecdf_plot.php
trunk/rkward/rkward/plugins/plots/scatterplot_matrix.php
trunk/rkward/rkward/plugins/plots/scatterplot_matrix.xml
trunk/rkward/rkward/plugins/plots/stripchart_plot.php
trunk/rkward/rkward/plugins/plots/stripchart_plot.xml
Modified: trunk/rkward/rkward/plugins/plots/ecdf_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/ecdf_plot.php 2007-01-25 18:58:38 UTC (rev 1224)
+++ trunk/rkward/rkward/plugins/plots/ecdf_plot.php 2007-01-25 19:14:11 UTC (rev 1225)
@@ -31,8 +31,8 @@
if ($final) { ?>
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 ()
-
<? } ?>
try ({
plot.ecdf (<? echo ($x); ?>, <? getRK ("dopoints"); ?>, <? getRK ("verticals"); ?> <? getRK ("plotoptions.code.printout"); ?>)
Modified: trunk/rkward/rkward/plugins/plots/scatterplot_matrix.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/scatterplot_matrix.php 2007-01-25 18:58:38 UTC (rev 1224)
+++ trunk/rkward/rkward/plugins/plots/scatterplot_matrix.php 2007-01-25 19:14:11 UTC (rev 1225)
@@ -1,29 +1,43 @@
<?
- function preprocess () {
+function preprocess () {
?>
require(car)
<?
- }
-
- function calculate () {
- }
-
- function printout () {
+}
+
+function calculate () {
+}
+
+function printout () {
+ doPrintout (true);
+}
+
+function cleanup () {
+?>
+rm(rk.temp.x)
+<?
+}
+
+function preview () {
+ preprocess ();
+ calculate ();
+ doPrintout (false);
+ cleanup ();
+}
+
+function doPrintout ($final) {
$vars = str_replace ("\n", ",", trim (getRK_val ("x"))) ;
?>
rk.temp.x <- data.frame (<? echo ($vars); ?>)
+<? if ($final) { ?>
rk.header ("Scatterplot Matrix", parameters=list ("Diagonal Panels", "<? getRK("diag") ?>", "Plot points", "<? getRK ("plot_points"); ?>", "Smooth", "<? getRK ("smooth"); ?>", "Ellipses", "<? getRK ("ellipse"); ?> at 0.5 and 0.9 levels."))
rk.graph.on ()
+<? } ?>
try (scatterplot.matrix(rk.temp.x, diagonal="<? getRK("diag") ?>", plot.points=<? getRK ("plot_points"); ?>, smooth=<? getRK ("smooth"); ?>, ellipse=<? getRK ("ellipse"); ?>))
+<? if ($final) { ?>
rk.graph.off ()
-<?
- }
-
- function cleanup () {
+<? }
+}
?>
-rm(rk.temp.x)
-<?
- }
-?>
Modified: trunk/rkward/rkward/plugins/plots/scatterplot_matrix.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/scatterplot_matrix.xml 2007-01-25 18:58:38 UTC (rev 1224)
+++ trunk/rkward/rkward/plugins/plots/scatterplot_matrix.xml 2007-01-25 19:14:11 UTC (rev 1225)
@@ -8,7 +8,10 @@
<tab label="Variables" id="tab_variables">
<row>
<varselector id="vars"/>
- <varslot type="numeric" min_vars="1" multi="true" id="x" source="vars" required="true" label="variable(s):"/>
+ <column>
+ <varslot type="numeric" min_vars="1" multi="true" id="x" source="vars" required="true" label="variable(s):"/>
+ <preview id="preview"/>
+ </column>
</row>
</tab>
<tab label="Options" id="tab_options">
Modified: trunk/rkward/rkward/plugins/plots/stripchart_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/stripchart_plot.php 2007-01-25 18:58:38 UTC (rev 1224)
+++ trunk/rkward/rkward/plugins/plots/stripchart_plot.php 2007-01-25 19:14:11 UTC (rev 1225)
@@ -1,25 +1,40 @@
<?
- function preprocess () {
- }
-
- function calculate () {
- }
-
- function printout () {
+function preprocess () {
+}
+
+function calculate () {
+}
+
+function printout () {
+ doPrintout (true);
+}
+
+function cleanup () {
+}
+
+function preview () {
+ preprocess ();
+ calculate ();
+ doPrintout (false);
+ cleanup ();
+}
+
+function doPrintout ($final) {
$x = getRK_val ("x");
$g = getRK_val ("g");
$method = '"' . getRK_val ("method") . '"';
$jitter = getRK_val ("jitter");
$offset = getRK_val ("offset");
$vertical = getRK_val ("vertical");
-?>
+
+ if ($final) { ?>
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 ()
+<? } ?>
try (stripchart (<? echo ($x); ?> ~ (<? echo ($g); ?>), vertical=<? echo ($vertical); ?>, method = <? echo ($method); ?>, jitter = <? echo ($jitter); ?>, offset = <? echo ($offset); ?> <? getRK ("plotoptions.code.printout"); ?>))
+<? if ($final) { ?>
rk.graph.off ()
-<?
- }
-
- function cleanup () {
- }
+<? }
+}
?>
Modified: trunk/rkward/rkward/plugins/plots/stripchart_plot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/stripchart_plot.xml 2007-01-25 18:58:38 UTC (rev 1224)
+++ trunk/rkward/rkward/plugins/plots/stripchart_plot.xml 2007-01-25 19:14:11 UTC (rev 1225)
@@ -11,12 +11,11 @@
<tabbook>
<tab label="Variable(s)" >
<row>
+ <varselector id="vars" />
<column>
- <varselector id="vars" />
- </column>
- <column>
<varslot multi="false" type="numeric" id="x" source="vars" label="variable" required="true" />
<varslot multi="false" type="numeric" id="g" source="vars" label="Group" required="true" />
+ <preview id="preview"/>
</column>
<stretch/>
</row>
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