[rkward-cvs] SF.net SVN: rkward:[4305] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Tue Sep 25 08:28:41 UTC 2012
Revision: 4305
http://rkward.svn.sourceforge.net/rkward/?rev=4305&view=rev
Author: tfry
Date: 2012-09-25 08:28:41 +0000 (Tue, 25 Sep 2012)
Log Message:
-----------
Clean up boxplot generated code some more, and add a test (test standards will be updated, soon)
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/plugins/plots/box_plot.js
trunk/rkward/tests/plots.R
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2012-09-24 17:27:45 UTC (rev 4304)
+++ trunk/rkward/ChangeLog 2012-09-25 08:28:41 UTC (rev 4305)
@@ -20,6 +20,7 @@
- Fixed: Would not show output of system() commands to stderr on the console (on Unix-like systems)
- Allow some markup inside <text> elements in plugins, and auto-add breaks only for duplicate newlines.
- Reorganized t-test plugin, and add support for single sample t-tests
+- Box plot plugin gains more options for adding means
- Fixed: Function argument hints for the second half of the parameter list would not be quoted, correctly
- Improve keypress handling issues in the R Console, when the cursor or a selection is outside the editable range
- Fixed: Failure to open workspaces with non-latin1 filenames from the command line
Modified: trunk/rkward/rkward/plugins/plots/box_plot.js
===================================================================
--- trunk/rkward/rkward/plugins/plots/box_plot.js 2012-09-24 17:27:45 UTC (rev 4304)
+++ trunk/rkward/rkward/plugins/plots/box_plot.js 2012-09-25 08:28:41 UTC (rev 4305)
@@ -54,7 +54,8 @@
}
echo ('rk.graph.on()\n');
}
- echo ('try (boxplot (data_list' + boxwex + positions + ', notch = ' + getValue ("notch") + ', outline = ' + getValue("outline") + ', horizontal = ' + getValue("orientation") + getValue ("plotoptions.code.printout") + ')) #actual boxplot function\n');
+ echo ('try ({\n');
+ echo (' boxplot (data_list' + boxwex + positions + ', notch = ' + getValue ("notch") + ', outline = ' + getValue("outline") + ', horizontal = ' + getValue("orientation") + getValue ("plotoptions.code.printout") + ') #actual boxplot function\n');
if (do_mean) {
var mean_fun = "mean, na.rm=TRUE";
if (getValue ("type_of_mean") =="geometric_mean") {
@@ -72,9 +73,9 @@
}
if (horizontal) {
- echo (' try (points(1:length(data_list) ~ sapply(data_list, ' + mean_fun + '), pch=' + pch_mean + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ')) #calculates the mean for all data and adds a point at the corresponding position\n');
+ echo (' points(1:length(data_list) ~ sapply(data_list, ' + mean_fun + '), pch=' + pch_mean + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ') #calculates the mean for all data and adds a point at the corresponding position\n');
} else {
- echo (' try (points(sapply(data_list, ' + mean_fun + '), pch=' + pch_mean + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ')) #calculates the mean for all data and adds a point at the corresponding position\n');
+ echo (' points(sapply(data_list, ' + mean_fun + '), pch=' + pch_mean + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ') #calculates the mean for all data and adds a point at the corresponding position\n');
}
}
@@ -89,6 +90,7 @@
echo (' points(sd_high, pch=' + pch_sd_high + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ')\n');
}
}
+ echo ('})\n'); // end of try ()
if (plot_adds.length > 0) {
echo ('\n');
Modified: trunk/rkward/tests/plots.R
===================================================================
--- trunk/rkward/tests/plots.R 2012-09-24 17:27:45 UTC (rev 4304)
+++ trunk/rkward/tests/plots.R 2012-09-25 08:28:41 UTC (rev 4305)
@@ -25,7 +25,9 @@
rk.call.plugin ("rkward::barplot", barplot_embed.colors.string="rainbow", barplot_embed.labels.state="1", barplot_embed.legend.state="1", barplot_embed.place.string="3", barplot_embed.plotoptions.add_grid.state="0", barplot_embed.plotoptions.asp.real="0.00", barplot_embed.plotoptions.main.text="", barplot_embed.plotoptions.pointcolor.color.string="", barplot_embed.plotoptions.pointtype.string="", barplot_embed.plotoptions.sub.text="", barplot_embed.plotoptions.xaxt.state="", barplot_embed.plotoptions.xlab.text="", barplot_embed.plotoptions.xlog.state="", barplot_embed.plotoptions.yaxt.state="", barplot_embed.plotoptions.ylab.text="", barplot_embed.plotoptions.ylog.state="", barplot_embed.type.string="juxtaposed", limit.checked="0", names_mode.string="default", tabulate.checked="1", tabulate_options.groups.available="warpbreaks[[\"wool\"]]\nwarpbreaks[[\"tension\"]]", tabulate_options.outcome.available="warpbreaks[[\"breaks\"]]", tabulate_options.stat.string="sum", submit.mode="submit")
}),
new ("RKTest", id="boxplot", call=function () {
- rk.call.plugin ("rkward::box_plot", cex_sd_mean.real="1.00", mean.state="TRUE", names_exp.text="names (x)", names_mode.string="default", notch.state="FALSE", orientation.string="FALSE", outline.state="TRUE", pch_mean.real="15.", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", sd.state="", sd_mean_color.color.string="blue", x.available="women[[\"weight\"]]\nwomen[[\"height\"]]", submit.mode="submit")
+ rk.call.plugin ("rkward::box_plot", boxwex.real="0.80", cex_sd_mean.real="1.00", data_mode.string="separate_vars", mean.checked="1", names_mode.string="default", notch.state="FALSE", orientation.string="FALSE", outline.state="TRUE", pch_mean.real="15.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.cexaxis.text="", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.ticklblrot.string="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", sd.checked="0", sd_mean_color.color.string="blue", trim.real="0.00", type_of_mean.string="arithmetic_mean", x.available="women[[\"weight\"]]\nwomen[[\"height\"]]", submit.mode="submit")
+
+ rk.call.plugin ("rkward::box_plot", boxwex.real="0.80", cex_sd_mean.real="1.00", data_mode.string="separate_vars", mean.checked="1", names_mode.string="default", notch.state="FALSE", orientation.string="FALSE", outline.state="TRUE", pch_mean.real="15.00", pch_sd_high.real="3.00", pch_sd_low.real="3.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.cexaxis.text="", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.ticklblrot.string="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", sd.checked="1", sd_mean_color.color.string="blue", type_of_mean.string="geometric_mean", x.available="women[[\"weight\"]]\nwomen[[\"height\"]]", submit.mode="submit")
}),
new ("RKTest", id="boxplot_grouped", call=function () {
rk.call.plugin ("rkward::box_plot", data_mode.string="grouped_outcome", groups.available="warpbreaks[[\"tension\"]]\nwarpbreaks[[\"wool\"]]", mean.state="", names_exp.text="names (x)", names_mode.string="default", notch.state="FALSE", orientation.string="TRUE", outcome.available="warpbreaks[[\"breaks\"]]", outline.state="FALSE", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", sd.state="", x.available="datasets::women[[\"weight\"]]\ndatasets::women[[\"height\"]]", submit.mode="submit")
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