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

sjar at users.sourceforge.net sjar at users.sourceforge.net
Tue Aug 7 19:51:15 UTC 2007


Revision: 1948
          http://rkward.svn.sourceforge.net/rkward/?rev=1948&view=rev
Author:   sjar
Date:     2007-08-07 12:51:14 -0700 (Tue, 07 Aug 2007)

Log Message:
-----------
* added "names" input for pie chart. makes it possible to use the original data as names or another string
* please think of cenarios where this approach my not work

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/plots/piechart.php
    trunk/rkward/rkward/plugins/plots/piechart.rkh
    trunk/rkward/rkward/plugins/plots/piechart.xml

Modified: trunk/rkward/rkward/plugins/plots/piechart.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/piechart.php	2007-08-06 08:56:17 UTC (rev 1947)
+++ trunk/rkward/rkward/plugins/plots/piechart.php	2007-08-07 19:51:14 UTC (rev 1948)
@@ -17,6 +17,7 @@
 
 function doPrintout ($final) {
 	$vars = getRK_val ("x");
+	$names = getRK_val ("names");
 	$tabulate= getRK_val ("tabulate")=="TRUE";
 	$radius = getRK_val ("radius");
 	$col = getRK_val ("colors");
@@ -50,6 +51,7 @@
 ?>
 try ({
 <?	if (!empty ($plotpre)) printIndented ("\t", $plotpre); ?>
+	names (x) <- <? echo ($names); ?>;
 	pie(x<? echo ($options); ?>)
 <?	if (!empty ($plotpost)) printIndented ("\t", $plotpost); ?>
 })

Modified: trunk/rkward/rkward/plugins/plots/piechart.rkh
===================================================================
--- trunk/rkward/rkward/plugins/plots/piechart.rkh	2007-08-06 08:56:17 UTC (rev 1947)
+++ trunk/rkward/rkward/plugins/plots/piechart.rkh	2007-08-07 19:51:14 UTC (rev 1948)
@@ -10,7 +10,9 @@
 
 	<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>
+		<setting id="x">Matrix, vector or a factor. Data needs to be numeric unless the tabulate option is checked, below.
+		<setting id="names">Defines the names for the data. You can use the data set as input or enter names (must be type "string" in this case).
+	</setting>
 		<setting id="tabulate">Use tabulate option mainly for factor variables or wherever else applicable.</setting>
 		<caption id="tab_options"/>
 		<setting id="colors">Type of colors to use.</setting>

Modified: trunk/rkward/rkward/plugins/plots/piechart.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/piechart.xml	2007-08-06 08:56:17 UTC (rev 1947)
+++ trunk/rkward/rkward/plugins/plots/piechart.xml	2007-08-07 19:51:14 UTC (rev 1948)
@@ -16,6 +16,7 @@
 					<column>
 					<varslot min_vars="1" id="x" source="vars" required="true" label="Variable"/>
 					<checkbox id="tabulate" label="Tabulate" value="TRUE" value_unchecked="FALSE" checked="false" />
+					<varslot min_vars="1" id="names" source="vars" required="true" label="Names"/>
 					<stretch/>
 					<preview id="preview"/>
 					</column>


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