[rkward-cvs] SF.net SVN: rkward:[2667] trunk/rkward/rkward/plugins/plots
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Fri Sep 25 11:59:11 UTC 2009
Revision: 2667
http://rkward.svn.sourceforge.net/rkward/?rev=2667&view=rev
Author: tfry
Date: 2009-09-25 11:59:10 +0000 (Fri, 25 Sep 2009)
Log Message:
-----------
Nicer handling of the jitter and offset options
Modified Paths:
--------------
trunk/rkward/rkward/plugins/plots/stripchart_plot.php
trunk/rkward/rkward/plugins/plots/stripchart_plot.xml
Modified: trunk/rkward/rkward/plugins/plots/stripchart_plot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/stripchart_plot.php 2009-09-25 11:58:40 UTC (rev 2666)
+++ trunk/rkward/rkward/plugins/plots/stripchart_plot.php 2009-09-25 11:59:10 UTC (rev 2667)
@@ -19,17 +19,23 @@
$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 ($method == "\"jitter\"") {
+ $opts .= ", jitter = " . getRK_val ("jitter");
+ $params .= ", \"Jitter\" = " . getRK_val ("jitter");
+ } else if ($method == "\"stack\"") {
+ $opts .= ", offset = " . getRK_val ("offset");
+ $params .= ", \"Offset\" = " . getRK_val ("offset");
+ }
+ $orientation = getRK_val ("orientation");
+ if ($orientation == "Vertical") $opts .= ", vertical = TRUE";
$plot_adds = getRK_val ("plotoptions.code.calculate"); //add grid and alike
if ($final) { ?>
-rk.header ("Stripchart", list ("Variable", rk.get.description (<? echo ($x); ?>), "Group", rk.get.description (<? echo ($g); ?>), "Method", <? echo ($method); ?>, "Jitter", <? echo ($jitter); ?>, "Plot drawn vertically", <? echo ($vertical); ?>, "Offset", <? echo ($offset); ?>))
+rk.header ("Stripchart", list ("Variable"=rk.get.description (<? echo ($x); ?>), "Group"=rk.get.description (<? echo ($g); ?>), "Method"=<? echo ($method); echo ($params); ?>, "Orientation"="<? echo ($orientation); ?>"))
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"); ?>))
+try (stripchart (<? echo ($x); ?> ~ (<? echo ($g); ?>), method = <? echo ($method); echo ($opts); getRK ("plotoptions.code.printout"); ?>))
<? if (!empty ($plot_adds)) { ?>
<? // print the grid() related code
Modified: trunk/rkward/rkward/plugins/plots/stripchart_plot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/stripchart_plot.xml 2009-09-25 11:58:40 UTC (rev 2666)
+++ trunk/rkward/rkward/plugins/plots/stripchart_plot.xml 2009-09-25 11:59:10 UTC (rev 2667)
@@ -8,6 +8,11 @@
<set id="plotoptions.allow_asp" to="true"/>
<set id="plotoptions.allow_grid" to="true"/>
+
+ <convert id="method_jitter" mode="equals" sources="method.string" standard="jitter"/>
+ <convert id="method_stack" mode="equals" sources="method.string" standard="stack"/>
+ <connect client="jitter.enabled" governor="method_jitter"/>
+ <connect client="offset.enabled" governor="method_stack"/>
</logic>
<dialog label="Stripchart" >
<tabbook>
@@ -17,26 +22,30 @@
<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" />
+ <stretch/>
<preview id="preview"/>
</column>
- <stretch/>
</row>
</tab>
<tab label="Options">
<row>
- <radio id="method" label="Method">
- <text>Method to be used to separate coincident points</text>
- <option value="overplot" label="Overplot (Default)"/>
- <option value="jitter" label="jitter"/>
- <option value="stack" label="stack"/>
- </radio>
- <spinbox label="Jitter" id="jitter" initial="0.1" />
- <spinbox label="offset" id="offset" initial="0.33333333333" />
- <radio id="vertical" label="Orientation">
- <option value="FALSE" label="Horizontal"/>
- <option value="TRUE" label="Vertical"/>
- </radio>
- <stretch/>
+ <column>
+ <radio id="method" label="Treatment of identical values">
+ <option value="overplot" label="Overplot"/>
+ <option value="jitter" label="Jitter"/>
+ <option value="stack" label="Stack"/>
+ </radio>
+ <spinbox label="Jitter" id="jitter" initial="0.1" />
+ <spinbox label="offset" id="offset" initial="0.33333333333" />
+ <stretch/>
+ </column>
+ <column>
+ <radio id="orientation" label="Orientation">
+ <option value="Horizontal" label="Horizontal"/>
+ <option value="Vertical" label="Vertical"/>
+ </radio>
+ <stretch/>
+ </column>
</row>
</tab>
<tab label="Plot Options" >
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