[rkward-cvs] SF.net SVN: rkward: [1221] trunk/rkward/rkward/plugins/plots
nono_231 at users.sourceforge.net
nono_231 at users.sourceforge.net
Thu Jan 25 12:04:17 UTC 2007
Revision: 1221
http://svn.sourceforge.net/rkward/?rev=1221&view=rev
Author: nono_231
Date: 2007-01-25 04:04:17 -0800 (Thu, 25 Jan 2007)
Log Message:
-----------
Several changes. Corrections on .xml and .php. Removed default values from .rkh page.
Modified Paths:
--------------
trunk/rkward/rkward/plugins/plots/barplot.php
trunk/rkward/rkward/plugins/plots/barplot.rkh
trunk/rkward/rkward/plugins/plots/barplot.xml
Modified: trunk/rkward/rkward/plugins/plots/barplot.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/barplot.php 2007-01-25 10:18:14 UTC (rev 1220)
+++ trunk/rkward/rkward/plugins/plots/barplot.php 2007-01-25 12:04:17 UTC (rev 1221)
@@ -1,6 +1,23 @@
<?
function preprocess () {
+ ?>
+rk.temp.barplot2<-function(x, beside=<? getRK ("beside"); ?>, legend.text=<? getRK ("legend"); ?>, rainbow=<? getRK ("rainbow"); ?>, labels=<? getRK ("labels"); ?>, place=<? getRK ("place"); ?>){
+if(beside){
+ if(rainbow) {
+ rk.temp.barplot <- barplot((x), col=rainbow(x), beside=beside, legend.text=legend.text, ylim = range(x) * c(0, 1.2))
+ }
+ else {
+ rk.temp.barplot <- barplot((x), beside=beside, legend.text=legend.text, ylim = range(x) * c(0, 1.2))
+ }
+ if(labels) text(rk.temp.barplot,x, labels=x, pos=place, offset=.5)
+ }
+ else {
+ if(rainbow) barplot((x), col=rainbow(x), legend.text=legend.text)
+ else barplot((x), legend.text=legend.text)
}
+}
+<?
+}
function calculate () {
}
@@ -17,19 +34,7 @@
rk.graph.on ()
try ({
- if(<? getRK ("beside"); ?>){
- if(<? getRK ("rainbow"); ?>) {
- rk.temp.barplot <- barplot((rk.temp.x), col=rainbow(rk.temp.x), beside=<? getRK ("beside"); ?>, legend.text=<? getRK ("legend"); ?>, ylim = range(rk.temp.x) * c(0, 1.2))
- }
- else {
- rk.temp.barplot <- barplot((rk.temp.x), beside=<? getRK ("beside"); ?>, legend.text=<? getRK ("legend"); ?>, ylim = range(rk.temp.x) * c(0, 1.2))
- }
- if(<? getRK ("labels"); ?>) text(rk.temp.barplot, rk.temp.x, labels=rk.temp.x, pos=<? getRK ("place"); ?>, offset=.5)
- }
- else {
- if(<? getRK ("rainbow"); ?>) barplot((rk.temp.x), col=rainbow(rk.temp.x), legend.text=<? getRK ("legend"); ?>)
- else barplot((rk.temp.x), legend.text=<? getRK ("legend"); ?>)
- }
+rk.temp.barplot2(rk.temp.x)
})
rk.graph.off ()
@@ -39,7 +44,7 @@
function cleanup () {
?>
-rm(rk.temp.barplot, rk.temp.x, rk.temp.x2, rk.temp.rainbow)
+rm (list=grep ("^rk.temp", ls (), value=TRUE))
<?
}
?>
Modified: trunk/rkward/rkward/plugins/plots/barplot.rkh
===================================================================
--- trunk/rkward/rkward/plugins/plots/barplot.rkh 2007-01-25 10:18:14 UTC (rev 1220)
+++ trunk/rkward/rkward/plugins/plots/barplot.rkh 2007-01-25 12:04:17 UTC (rev 1221)
@@ -12,12 +12,12 @@
<caption id="tab_variables"/>
<setting id="x">Select a data matrix or a factor to be plotted.</setting>
<caption id="tab_options"/>
- <setting id="legend">Select if you want to add a legend to the barplot. The row names of height will be used as labels if they are non-null. By default there is no legend.</setting>
- <setting id="rainbow">Select between grey and rainbow collors. Default is grey colors.</setting>
+ <setting id="legend">Select if you want to add a legend to the barplot. The row names of height will be used as labels if they are non-null.</setting>
+ <setting id="rainbow">Select between grey and rainbow collors.</setting>
<setting id="beside">Select a type between juxtaposed bars and stacked bars. If you select stacked bars you can not display bar values (labels). </setting>
- <setting id="labels">Select if you want to display bar values (labels). By default the values sould not be displayed.</setting>
+ <setting id="labels">Select if you want to display bar values (labels).</setting>
<setting id="place">If you have selected to display bar values (labels) you can select where should they be displayed:
- <li> Above the bars (default)</li>
+ <li> Above the bars </li>
<li> Beside the bars </li>
<li> Inside the bars </li>
</setting>
Modified: trunk/rkward/rkward/plugins/plots/barplot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/barplot.xml 2007-01-25 10:18:14 UTC (rev 1220)
+++ trunk/rkward/rkward/plugins/plots/barplot.xml 2007-01-25 12:04:17 UTC (rev 1221)
@@ -6,7 +6,8 @@
<convert id="besidevalue" mode="equals" sources="beside.string" standard="TRUE" />
<connect client="labels.enabled" governor="besidevalue" />
<convert id="labelsvalue" mode="equals" sources="labels.string" standard="TRUE" />
- <connect client="place.enabled" governor="labelsvalue" />
+ <convert id="labelsvalue2" mode="and" sources="labelsvalue;labels.enabled" />
+ <connect client="place.enabled" governor="labelsvalue2" />
</logic>
<dialog label="Correlation Matrix Plot" >
<tabbook>
@@ -14,7 +15,7 @@
<row>
<varselector id="vars"/>
<column>
- <varslot type="numeric" min_vars="1" id="x" source="vars" required="true" label="Matrix or Factor"/>
+ <varslot min_vars="1" id="x" source="vars" required="true" label="Matrix or Factor"/>
</column>
</row>
</tab>
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