[education/rkward] /: update more tests and fix scatterplot matrix diagonal
Thomas Friedrichsmeier
null at kde.org
Mon Apr 11 22:09:13 BST 2022
Git commit a5e17063b1f06d01c46145a5da15aa982374b2f9 by Thomas Friedrichsmeier.
Committed on 11/04/2022 at 21:09.
Pushed by tfry into branch 'master'.
update more tests and fix scatterplot matrix diagonal
M +1 -1 rkward/plugins/plots/scatterplot_matrix.js
M +5 -5 rkward/plugins/plots/scatterplot_matrix.xml
M +1 -1 tests/distributions/jb_test.rkout
M +1 -1 tests/plots.R
https://invent.kde.org/education/rkward/commit/a5e17063b1f06d01c46145a5da15aa982374b2f9
diff --git a/rkward/plugins/plots/scatterplot_matrix.js b/rkward/plugins/plots/scatterplot_matrix.js
index 653009a9..b7d57fb2 100644
--- a/rkward/plugins/plots/scatterplot_matrix.js
+++ b/rkward/plugins/plots/scatterplot_matrix.js
@@ -22,7 +22,7 @@ function doPrintout (full) {
echo ('\n');
echo ('rk.graph.on ()\n');
}
- echo ('try (scatterplotMatrix(data, diagonal="' + getValue("diag") + '", plot.points=' + getValue ("plot_points") + ', smooth=' + getValue ("smooth") + ', ellipse=' + getValue ("ellipse") + '))\n');
+ echo ('try (scatterplotMatrix(data, diagonal=' + getValue("diag") + ', plot.points=' + getValue ("plot_points") + ', smooth=' + getValue ("smooth") + ', ellipse=' + getValue ("ellipse") + '))\n');
if (full) {
echo ('rk.graph.off ()\n');
}
diff --git a/rkward/plugins/plots/scatterplot_matrix.xml b/rkward/plugins/plots/scatterplot_matrix.xml
index 8dd5e7e9..c3fc9cec 100644
--- a/rkward/plugins/plots/scatterplot_matrix.xml
+++ b/rkward/plugins/plots/scatterplot_matrix.xml
@@ -16,11 +16,11 @@
</tab>
<tab label="Options" id="tab_options">
<radio id="diag" label="Diagonal panels">
- <option value="density" label="Density plot"/>
- <option value="boxplot" label="Boxplot"/>
- <option checked="true" value="histogram" label="Histogram"/>
- <option value="qqplot" label="QQplot"/>
- <option value="none" label="No plot"/>
+ <option value="TRUE" label="Density plot"/>
+ <option value="list(method="boxplot")" label="Boxplot"/>
+ <option checked="true" value="list(method="histogram")" label="Histogram"/>
+ <option value="list(method="qqplot")" label="QQplot"/>
+ <option value="FALSE" label="No plot"/>
</radio>
<checkbox id="plot_points" label="Plot points" value="TRUE" value_unchecked="FALSE" checked="true"/>
<checkbox id="smooth" label="Plot smooth" value="TRUE" value_unchecked="FALSE" checked="false"/>
diff --git a/tests/distributions/jb_test.rkout b/tests/distributions/jb_test.rkout
index af07b336..a2b081c0 100644
--- a/tests/distributions/jb_test.rkout
+++ b/tests/distributions/jb_test.rkout
@@ -6,5 +6,5 @@ DATE<br />
<table border="1">
<tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Statistic</td><td>df</td><td>p-value</td></tr>
<tr><td>shape</td><td>48</td><td>0</td><td>X-squared = 13.402</td><td>2</td><td>0.0012296</td></tr>
-<tr><td>perm</td><td>48</td><td>0</td><td>X-squared = 5.9508</td><td>2</td><td>0.051028</td></tr>
+<tr><td>perm </td><td>48</td><td>0</td><td>X-squared = 5.9508</td><td>2</td><td>0.0510281</td></tr>
</table>
diff --git a/tests/plots.R b/tests/plots.R
index 18461be3..73cb0c75 100644
--- a/tests/plots.R
+++ b/tests/plots.R
@@ -71,7 +71,7 @@ suite <- new ("RKTestSuite", id="plots",
rk.call.plugin ("rkward::scatterplot", cex.text="1", col.text="c ('black', 'red')", color.string="each", isCex.string="all", isPch.string="all", pch.text="1", 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="", pointtype.string="p", type_mode.string="all", x.available="women[[\"weight\"]]\nswiss[[\"Education\"]]", y.available="women[[\"height\"]]\nswiss[[\"Catholic\"]]", submit.mode="submit")
}),
new ("RKTest", id="scatterplot_matrix", call=function () {
- rk.call.plugin ("rkward::scatterplot_matrix", diag.string="histogram", ellipse.state="FALSE", plot_points.state="TRUE", smooth.state="FALSE", x.available="swiss", submit.mode="submit")
+ rk.call.plugin ("rkward::scatterplot_matrix", diag.string="list(method=\"histogram\")", ellipse.state="FALSE", plot_points.state="TRUE", smooth.state="FALSE", x.available="swiss", submit.mode="submit")
}, libraries=c ("car")),
new ("RKTest", id="stem_leaf_plot", call=function () {
rk.call.plugin ("rkward::stem", atom.real="0.01", scale.real="1.50", width.real="80.00", x.available="swiss[[\"Fertility\"]]", submit.mode="submit")
More information about the rkward-tracker
mailing list