[rkward-cvs] SF.net SVN: rkward:[2745] trunk/rkward/rkward/plugins/plots
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Feb 18 21:55:32 UTC 2010
Revision: 2745
http://rkward.svn.sourceforge.net/rkward/?rev=2745&view=rev
Author: tfry
Date: 2010-02-18 21:55:31 +0000 (Thu, 18 Feb 2010)
Log Message:
-----------
Convert more plots.
Modified Paths:
--------------
trunk/rkward/rkward/plugins/plots/pareto.js
trunk/rkward/rkward/plugins/plots/pareto.xml
trunk/rkward/rkward/plugins/plots/piechart.js
trunk/rkward/rkward/plugins/plots/piechart.xml
trunk/rkward/rkward/plugins/plots/plot.js
trunk/rkward/rkward/plugins/plots/plot.xml
trunk/rkward/rkward/plugins/plots/plot_stepfun_options.js
trunk/rkward/rkward/plugins/plots/plot_stepfun_options.xml
trunk/rkward/rkward/plugins/plots/scatterplot.js
trunk/rkward/rkward/plugins/plots/scatterplot_matrix.js
trunk/rkward/rkward/plugins/plots/scatterplot_matrix.xml
trunk/rkward/rkward/plugins/plots/sieve_plot.js
trunk/rkward/rkward/plugins/plots/sieve_plot.xml
trunk/rkward/rkward/plugins/plots/stem.js
trunk/rkward/rkward/plugins/plots/stem.xml
trunk/rkward/rkward/plugins/plots/stripchart_plot.js
trunk/rkward/rkward/plugins/plots/stripchart_plot.xml
Modified: trunk/rkward/rkward/plugins/plots/pareto.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/pareto.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/pareto.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,12 +1,3 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
function preprocess () {
echo ('require(qcc)\n');
if (getValue ("descriptives")=="TRUE") {
@@ -21,17 +12,13 @@
function preview () {
preprocess ();
- calculate ();
doPrintout (false);
}
function doPrintout (full) {
- var vars = "";
- var descriptives = "";
- var tabulate = "";
- vars = getValue ("x");
- descriptives = getValue ("descriptives")=="TRUE";
- tabulate= getValue ("tabulate")=="TRUE";
+ var vars = getValue ("x");
+ var descriptives = getValue ("descriptives")=="TRUE";
+ var tabulate = getValue ("tabulate")=="TRUE";
if (tabulate) {
echo ('x <- table (' + vars + ', exclude=NULL)\n');
Modified: trunk/rkward/rkward/plugins/plots/pareto.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/pareto.xml 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/pareto.xml 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="pareto.php" />
+ <code file="pareto.js" />
<help file="pareto.rkh" />
<logic>
<connect client="plotoptions.default_main" governor="x.available" />
Modified: trunk/rkward/rkward/plugins/plots/piechart.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/piechart.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/piechart.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,86 +1,49 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Warning: '$' inside '"'-delimited string. This might be a variable name. Please check by hand!
-Warning: '$' inside '"'-delimited string. This might be a variable name. Please check by hand!
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
-
-
function printout () {
doPrintout (true);
}
function preview () {
- preprocess ();
- calculate ();
doPrintout (false);
}
function doPrintout (full) {
- var vars = "";
- var tabulate = "";
+ var vars = getValue ("x");
+ var tabulate = getValue ("tabulate");
var tabulate_header = "";
- var radius = "";
- var angle = "";
- var angle_inc = "";
- var density = "";
- var density_inc = "";
- var col = "";
- var clockwise = "";
- var clockwise_header = "";
- var names_mode = "";
- var options = "";
- var plotpre = "";
- var plotpost = "";
- vars = getValue ("x");
- tabulate= getValue ("tabulate");
if (tabulate) {
tabulate_header = '"Tabulate", "Yes"';
} else {
tabulate_header = '"Tabulate", "No"';
}
- radius = getValue ("radius");
- angle = getValue ("angle");
- angle_inc = getValue ("angle_inc");
- density = getValue ("density");
- density_inc = getValue ("density_inc");
- col = getValue ("colors");
- clockwise = getValue ("clockwise");
+ var radius = getValue ("radius");
+ var angle = getValue ("angle");
+ var angle_inc = getValue ("angle_inc");
+ var density = getValue ("density");
+ var density_inc = getValue ("density_inc");
+ var col = getValue ("colors");
+ var clockwise = getValue ("clockwise");
+ var clockwise_header = "";
if (clockwise) {
clockwise_header = '"Clockwise", "Yes"';
} else {
clockwise_header = '"Clockwise", "No"';
}
- names_mode = getValue ("names_mode");
+ var names_mode = getValue ("names_mode");
- options = "";
- options += ", clockwise =" + clockwise;
+ var options = ", clockwise =" + clockwise;
if ((density >= 0) || (density_inc != 0)) options += ", density =" + density;
- if (density_inc != 0) options += "+ $density_inc * 0:length (x)";
+ if (density_inc != 0) options += " + " + density_inc + " * 0:length (x)";
if ((density > 0) || density_inc != 0) {
options += ", angle =" + angle;
- if (angle_inc != 0) options += "+ $angle_inc * 0:length (x)";
+ if (angle_inc != 0) options += " + " + angle_inc + " * 0:length (x)";
}
if (radius != 0+8) options += ", radius=" + radius;
if (col == "rainbow") options += ", col=rainbow (if(is.matrix(x)) dim(x) else length(x))";
else if (col == "grayscale") options += ", col=gray.colors (if(is.matrix(x)) dim(x) else length(x))";
options += getValue ("plotoptions.code.printout");
- plotpre = getValue ("plotoptions.code.preprocess");
- plotpost = getValue ("plotoptions.code.calculate");
+ var plotpre = getValue ("plotoptions.code.preprocess");
+ var plotpost = getValue ("plotoptions.code.calculate");
if (tabulate) {
echo ('x <- table (' + vars + ', exclude=NULL)\n');
@@ -99,7 +62,7 @@
}
echo ('try ({\n');
- if (!empty (plotpre)) printIndented ("\t", plotpre);
+ if (plotpre.length > 0) printIndented ("\t", plotpre);
if (names_mode == "rexp") {
echo ("\tnames(x) <- " + getValue ("names_exp") + "\n");
} else if (names_mode == "custom") {
@@ -107,7 +70,7 @@
}
echo (' pie(x' + options + ')\n');
- if (!empty (plotpost)) printIndented ("\t", plotpost);
+ if (plotpost.length > 0) printIndented ("\t", plotpost);
echo ('})\n');
if (full) {
echo ('rk.graph.off ()\n');
Modified: trunk/rkward/rkward/plugins/plots/piechart.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/piechart.xml 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/piechart.xml 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="piechart.php" />
+ <code file="piechart.js" />
<help file="piechart.rkh" />
<logic>
<set id="plotoptions.allow_ylim" to="false"/>
Modified: trunk/rkward/rkward/plugins/plots/plot.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/plot.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/plot.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,35 +1,19 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
-
-
function printout () {
doPrintout (true);
}
function preview () {
- preprocess ();
- calculate ();
doPrintout (false);
}
function doPrintout (full) {
- var x = "";
- var y = "";
- var plot_adds = "";
- x = getValue ("xvarslot");
- y = getValue ("yvarslot");
+ var x = getValue ("xvarslot");
+ var y = getValue ("yvarslot");
if (!(y == "")) {
y = ", " + y;
}
// get additional code (as of now grid) from the calculate section
- plot_adds = getValue ("plotoptions.code.calculate");
+ var plot_adds = getValue ("plotoptions.code.calculate");
if (full) {
@@ -39,7 +23,7 @@
echo ('try({\n');
echo (' plot(' + x + y + getValue ("plotoptions.code.printout") + ');\n');
- if (!empty (plot_adds)) {
+ if (plot_adds.length > 0) {
echo ('\n');
// print the grid() related code
printIndented ("\t", plot_adds);
Modified: trunk/rkward/rkward/plugins/plots/plot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/plot.xml 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/plot.xml 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot.php" />
+ <code file="plot.js" />
<help file="plot.rkh" />
<logic>
<set id="plotoptions.allow_log" to="true"/>
Modified: trunk/rkward/rkward/plugins/plots/plot_stepfun_options.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/plot_stepfun_options.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/plot_stepfun_options.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,59 +1,32 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Warning: '$' inside '"'-delimited string. This might be a variable name. Please check by hand!
-Warning: '$' inside '"'-delimited string. This might be a variable name. Please check by hand!
-Warning: '$' inside '"'-delimited string. This might be a variable name. Please check by hand!
-Warning: '$' inside '"'-delimited string. This might be a variable name. Please check by hand!
-Warning: '$' inside '"'-delimited string. This might be a variable name. Please check by hand!
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
-
-
function printout () {
- var options = "";
- var addtoplot = "";
- var lty = "";
- var verticals = "";
- var do_points = "";
- var col_hor = "";
- var col_y0 = "";
- var col_y1 = "";
- options = "";
- addtoplot = getValue ("addtoplot");
+ var options = "";
+ var addtoplot = getValue ("addtoplot");
if (addtoplot) options += ', add=TRUE';
- lty = getValue ("linetype");
- if (!(lty == "")) options += ", lty=\"{$lty}\"";
+ var lty = getValue ("linetype");
+ if (lty != "") options += ", lty=\"" + lty + "\"";
- verticals = getValue ("verticals");
+ var verticals = getValue ("verticals");
if (verticals) {
options += ', verticals=TRUE' + getValue ("col_vert.code.printout");
} else options += ', verticals=FALSE';
- do_points = getValue ("do_points");
+ var do_points = getValue ("do_points");
if (do_points) {
options += getValue ("col_points.code.printout");
} else options += ', do.points=FALSE';
- col_hor = getValue ("col_hor.code.printout");
- if (!(col_hor == "")) options += getValue ("col_hor.code.printout");
+ var col_hor = getValue ("col_hor.code.printout");
+ if (col_hor != "") options += getValue ("col_hor.code.printout");
if (getValue ("allow_col01line")) {
- col_y0 = getValue ("col_y0.code.printout");
- col_y1 = getValue ("col_y1.code.printout");
+ var col_y0 = getValue ("col_y0.code.printout");
+ var col_y1 = getValue ("col_y1.code.printout");
if ((col_y0 != "") && (col_y1 != "")) {
- options += ", col.01line=c({$col_y0},{$col_y1})";
- }
- elseif ((col_y0 != "") || (col_y1 != "")) {
- options += ", col.01line={$col_y0}{$col_y1}";
+ options += ", col.01line=c(" + col_y0 + "," + col_y1 + ")";
+ } else if ((col_y0 != "") || (col_y1 != "")) {
+ options += ", col.01line=" + col_y0 + col_y1;
} // col.01line option to plot.ecdf()
}
Modified: trunk/rkward/rkward/plugins/plots/plot_stepfun_options.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/plot_stepfun_options.xml 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/plot_stepfun_options.xml 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="plot_stepfun_options.php"/>
+ <code file="plot_stepfun_options.js"/>
<help file="plot_stepfun_options.rkh"/>
<logic>
<external id="allow_addtoplot" default="true"/>
Modified: trunk/rkward/rkward/plugins/plots/scatterplot.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/scatterplot.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/scatterplot.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,58 +1,45 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
var x;
var y;
-var undefined;
-
function calculate () {
- var type = "";
- var col = "";
- var pch = "";
- var cex = "";
x = str_replace ("\n", ",", trim (getValue ("x"))) ;
y = str_replace ("\n", ",", trim (getValue ("y"))) ;
+ var type = "";
if (getValue ("manual_type") == "true") {
type = getValue ("custom_type");
} else {
type = "c ('" + getValue ("pointtype") + "')";
}
- col = getValue ("col");
- pch = getValue ("pch");
- cex = getValue ("cex");
+ var col = getValue ("col");
+ var pch = getValue ("pch");
+ var cex = getValue ("cex");
+// input
+ echo ('Xvars <- list(' + x + ')\n');
+ echo ('Yvars <- list(' + y + ')\n');
echo ('\n');
-//input ?>
- Xvars <- list(<? echo (x + ')\n');
- echo ('Yvars <- list(' + y + ')\n');
- echo ('\n');
+
// verification (is this needed?) ?>
- if (length(Xvars) != length(Yvars)) {
- stop("Unequal number of X and Y variables given")
- }
+ echo ('if (length(Xvars) != length(Yvars)) {\n');
+ echo (' stop("Unequal number of X and Y variables given")\n');
+ echo ('}\n');
// find range of X/Y values needed
- Xrange <- range (c (Xvars), na+rm=TRUE)
- Yrange <- range (c (Yvars), na+rm=TRUE)
+ echo ('Xrange <- range (c (Xvars), na+rm=TRUE)\n');
+ echo ('Yrange <- range (c (Yvars), na+rm=TRUE)\n');
+ echo ('\n');
+ echo ('type <- rep (' + type + ', length.out=length (Xvars));\n');
+ echo ('col <- rep (' + col + ', length.out=length (Xvars));\n');
+ echo ('cex <- rep (' + cex + ', length.out=length (Xvars));\n');
+ echo ('pch <- rep (' + pch + ', length.out=length (Xvars));\n');
+}
- type <- rep (<? echo (type + ', length.out=length (Xvars));\n');
- echo ('col <- rep (' + col + ', length.out=length (Xvars));\n');
- echo ('cex <- rep (' + cex + ', length.out=length (Xvars));\n');
- echo ('pch <- rep (' + pch + ', length.out=length (Xvars));\n');
- }
-
function printout () {
doPrintout (true);
}
function preview () {
- preprocess ();
calculate ();
doPrintout (false);
}
Modified: trunk/rkward/rkward/plugins/plots/scatterplot_matrix.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/scatterplot_matrix.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/scatterplot_matrix.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,12 +1,3 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
function preprocess () {
echo ('require(car)\n');
}
@@ -18,22 +9,20 @@
function preview () {
preprocess ();
- calculate ();
doPrintout (false);
}
function doPrintout (full) {
- var vars = "";
- vars = str_replace ("\n", ",", trim (getValue ("x"))) ;
+ var vars = trim (getValue ("x")).replace (/\n/g, ",");
echo ('data <- data.frame (' + vars + ')\n');
echo ('\n');
if (full) {
- echo ('rk.header ("Scatterplot Matrix", parameters=list ("Diagonal Panels", "' + getValue("diag")) echo ('", "Plot points", "' + getValue ("plot_points") + '", "Smooth", "' + getValue ("smooth") + '", "Ellipses", "' + getValue ("ellipse") + ' at 0.5 and 0.9 levels."))\n');
+ echo ('rk.header ("Scatterplot Matrix", parameters=list ("Diagonal Panels", "' + getValue("diag") + '", "Plot points", "' + getValue ("plot_points") + '", "Smooth", "' + getValue ("smooth") + '", "Ellipses", "' + getValue ("ellipse") + ' at 0.5 and 0.9 levels."))\n');
echo ('\n');
echo ('rk.graph.on ()\n');
}
- echo ('try (scatterplot.matrix(data, diagonal="' + getValue("diag")) echo ('", plot.points=' + getValue ("plot_points") + ', smooth=' + getValue ("smooth") + ', ellipse=' + getValue ("ellipse") + '))\n');
+ echo ('try (scatterplot.matrix(data, diagonal="' + getValue("diag") + '", plot.points=' + getValue ("plot_points") + ', smooth=' + getValue ("smooth") + ', ellipse=' + getValue ("ellipse") + '))\n');
if (full) {
echo ('rk.graph.off ()\n');
}
Modified: trunk/rkward/rkward/plugins/plots/scatterplot_matrix.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/scatterplot_matrix.xml 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/scatterplot_matrix.xml 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="scatterplot_matrix.php" />
+ <code file="scatterplot_matrix.js" />
<help file="scatterplot_matrix.rkh" />
<dialog label="Scatterplot Matrix" >
Modified: trunk/rkward/rkward/plugins/plots/sieve_plot.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/sieve_plot.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/sieve_plot.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -20,19 +20,13 @@
function preview () {
preprocess ();
- calculate ();
doPrintout (false);
}
function doPrintout (full) {
- var vars = "";
- var shade = "";
- var sievetype = "";
- var plotpre = "";
- var plotpost = "";
- vars = getValue ("x");
- shade = getValue ("shade");
- sievetype = getValue ("sievetype");
+ var vars = getValue ("x");
+ var shade = getValue ("shade");
+ var sievetype = getValue ("sievetype");
{
echo ('x <- ' + vars);
}
@@ -43,12 +37,15 @@
echo ('rk.graph.on ()\n');
}
+ var plotpre = getValue ("plotoptions.code.preprocess");
+ var plotpost = getValue ("plotoptions.code.calculate");
+
echo ('try ({\n');
- if (!empty (plotpre)) printIndented ("\t", plotpre);
+ if (plotpre.length > 0) printIndented ("\t", plotpre);
echo (' sieve(x, shade = ' + shade + ', sievetype = "' + sievetype + '" ' + getValue ("plotoptions.code.printout") + ')\n');
- if (!empty (plotpost)) printIndented ("\t", plotpost);
+ if (plotpost.length > 0) printIndented ("\t", plotpost);
echo ('})\n');
if (full) {
echo ('rk.graph.off ()\n');
Modified: trunk/rkward/rkward/plugins/plots/sieve_plot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/sieve_plot.xml 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/sieve_plot.xml 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="sieve_plot.php" />
+ <code file="sieve_plot.js" />
<help file="sieve_plot.rkh" />
<logic>
<set id="plotoptions.allow_xlim" to="false"/>
Modified: trunk/rkward/rkward/plugins/plots/stem.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/stem.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/stem.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,23 +1,8 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-
----------------------------- */
-
-// globals
-var undefined;
-
-
-
function printout () {
- var x = "";
- var scale = "";
- var width = "";
- var atom = "";
- x = getValue ("x");
- scale = getValue ("scale");
- width = getValue ("width");
- atom = getValue ("atom");
+ var x = getValue ("x");
+ var scale = getValue ("scale");
+ var width = getValue ("width");
+ var atom = getValue ("atom");
echo ('rk.header ("Stem-and-Leaf Plot",\n');
echo (' parameters=list ("Variable", paste (rk.get.description (' + x + ')), "Plot Length", "' + scale + '","Plot Width", "' + width + '", "Tolerance", "' + atom + '"))\n');
Modified: trunk/rkward/rkward/plugins/plots/stem.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/stem.xml 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/stem.xml 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,8 +1,7 @@
<!DOCTYPE rkplugin>
-
<document>
- <code file="stem.php"/>
+ <code file="stem.js"/>
<help file="stem.rkh" />
<dialog label="Stem-and-Leaf Plots">
Modified: trunk/rkward/rkward/plugins/plots/stripchart_plot.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/stripchart_plot.js 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/stripchart_plot.js 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,36 +1,17 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
-
-
function printout () {
doPrintout (true);
}
function preview () {
- preprocess ();
- calculate ();
doPrintout (false);
}
function doPrintout (full) {
- var x = "";
- var g = "";
- var method = "";
var opts = "";
var params = "";
- var orientation = "";
- var plot_adds = "";
- x = getValue ("x");
- g = getValue ("g");
- method = '"' + getValue ("method") + '"';
+ var x = getValue ("x");
+ var g = getValue ("g");
+ var method = '"' + getValue ("method") + '"';
if (method == "\"jitter\"") {
opts += ", jitter = " + getValue ("jitter");
params += ", \"Jitter\" = " + getValue ("jitter");
@@ -38,9 +19,9 @@
opts += ", offset = " + getValue ("offset");
params += ", \"Offset\" = " + getValue ("offset");
}
- orientation = getValue ("orientation");
+ var orientation = getValue ("orientation");
if (orientation == "Vertical") opts += ", vertical = TRUE";
- plot_adds = getValue ("plotoptions.code.calculate"); //add grid and alike
+ var plot_adds = getValue ("plotoptions.code.calculate"); //add grid and alike
if (full) {
echo ('rk.header ("Stripchart", list ("Variable"=rk.get.description (' + x + '), "Group"=rk.get.description (' + g + '), "Method"=' + method + params + ', "Orientation"="' + orientation + '"))\n');
@@ -48,7 +29,7 @@
echo ('rk.graph.on ()\n');
}
echo ('try (stripchart (' + x + ' ~ (' + g + '), method = ' + method + opts + getValue ("plotoptions.code.printout") + '))\n');
- if (!empty (plot_adds)) {
+ if (plot_adds.length > 0) {
echo ('\n');
// print the grid() related code
printIndented ("\t", plot_adds);
Modified: trunk/rkward/rkward/plugins/plots/stripchart_plot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/stripchart_plot.xml 2010-02-14 19:20:50 UTC (rev 2744)
+++ trunk/rkward/rkward/plugins/plots/stripchart_plot.xml 2010-02-18 21:55:31 UTC (rev 2745)
@@ -1,6 +1,6 @@
<!DOCTYPE rkplugin>
<document>
- <code file="stripchart_plot.php" />
+ <code file="stripchart_plot.js" />
<logic>
<connect client="plotoptions.xvar" governor="x.available"/>
<set id="plotoptions.allow_log" to="true"/>
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