[rkward-cvs] SF.net SVN: rkward:[2377] branches/release_branch_0.4.9/rkward/plugins/ plots

sjar at users.sourceforge.net sjar at users.sourceforge.net
Sun Nov 9 19:02:58 UTC 2008


Revision: 2377
          http://rkward.svn.sourceforge.net/rkward/?rev=2377&view=rev
Author:   sjar
Date:     2008-11-09 19:02:58 +0000 (Sun, 09 Nov 2008)

Log Message:
-----------
* still experimental
* should work for all RKWard versions
* Initial version of the Extended Sieve Plot from the vcd package
* currently it needs data structures as shown in the package help

Added Paths:
-----------
    branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.php
    branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.rkh
    branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.xml

Added: branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.php
===================================================================
--- branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.php	                        (rev 0)
+++ branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.php	2008-11-09 19:02:58 UTC (rev 2377)
@@ -0,0 +1,44 @@
+<?
+function preprocess () { ?>
+require(vcd)
+<? }
+
+function calculate () {
+}
+
+function printout () {
+	doPrintout (true);
+}
+
+function preview () {
+	preprocess ();
+	calculate ();
+	doPrintout (false);
+}
+
+function doPrintout ($final) {
+	$vars = getRK_val ("x");
+	$shade = getRK_val ("shade");
+	$sievetype = getRK_val ("sievetype");
+{ ?>
+x <- <? echo ($vars); ?>
+<? } ?>
+
+<?	if ($final) { ?>
+rk.header ("Extended Sieve Plot", parameters=list ("Variable", rk.get.description (<? echo ($vars); ?>), "shade", <? echo ($shade); ?>))
+
+rk.graph.on ()
+<?	}
+?>
+try ({
+<?	if (!empty ($plotpre)) printIndented ("\t", $plotpre);
+	
+?>
+	sieve(x, shade = <? echo ($shade); ?>, sievetype = "<? echo ($sievetype); ?>" <? getRK ("plotoptions.code.printout"); ?>)
+<?	if (!empty ($plotpost)) printIndented ("\t", $plotpost); ?>
+})
+<?	if ($final) { ?>
+rk.graph.off ()
+<? }
+}
+?>

Added: branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.rkh
===================================================================
--- branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.rkh	                        (rev 0)
+++ branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.rkh	2008-11-09 19:02:58 UTC (rev 2377)
@@ -0,0 +1,22 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+Draw Extended Mosaic Plot
+	</summary>
+
+	<usage>
+DUMMY:
+	</usage>
+
+	<settings>
+		<caption id="tab_variables"/>
+		<setting id="x">Matrix, vector or a factor. Data needs to be numeric unless the tabulate option is checked, below.</setting>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://component/mosaic"/></li>
+			<li><link href="rkward://component/mosaic_plot"/></li>
+			<li><link href="rkward://rhelp/mosaic"/></li>
+		</ul>
+	</related>
+</document>

Added: branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.xml
===================================================================
--- branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.xml	                        (rev 0)
+++ branches/release_branch_0.4.9/rkward/plugins/plots/sieve_plot.xml	2008-11-09 19:02:58 UTC (rev 2377)
@@ -0,0 +1,36 @@
+<!DOCTYPE rkplugin>
+<document>
+	<code file="sieve_plot.php" />
+	<help file="sieve_plot.rkh" />
+	<logic>
+		<set id="plotoptions.allow_xlim" to="false"/>
+		<set id="plotoptions.allow_ylim" to="false"/>
+		<set id="plotoptions.allow_log" to="false"/>
+		<set id="plotoptions.allow_type" to="false"/>
+	</logic>
+	<dialog label="Extended Sieve Plot" >
+		<tabbook>
+			<tab label="Variables" id="tab_variables">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot multi="false" id="x" source="vars" required="true" label="Variable"/>
+						<stretch/>
+						<preview id="preview"/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options" id="options">
+				<row>
+					<checkbox label="shade" id="shade" value="TRUE" value_unchecked="FALSE" checked="true" />
+					<radio id="sievetype" label="sievetype" >
+						<option value="expected" label="expected" />
+						<option value="observed" label="observed" />
+					</radio>
+					<embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
+					<stretch/>
+				</row>
+			</tab>
+		</tabbook>
+	</dialog>
+</document>


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




More information about the rkward-tracker mailing list