5
Xvars <- list(women[["weight"]],swiss[["Education"]])
6
Yvars <- list(women[["height"]],swiss[["Catholic"]])
8
if (length(Xvars) != length(Yvars)) {
9
stop("Unequal number of X and Y variables given")
12
# find range of X/Y values needed
13
Xrange <- range (c (Xvars), na.rm=TRUE)
14
Yrange <- range (c (Yvars), na.rm=TRUE)
16
type <- rep (c ('p'), length.out=length (Xvars));
17
col <- rep (c ('black', 'red'), length.out=length (Xvars));
18
cex <- rep (1, length.out=length (Xvars));
19
pch <- rep (1, length.out=length (Xvars));
21
rk.header ("Scatterplot", parameters = list (
22
"X variables"=paste (rk.get.description (women[["weight"]],swiss[["Education"]]), collapse=", "),
23
"Y variables"=paste (rk.get.description (women[["height"]],swiss[["Catholic"]]), collapse=", ")))
29
plot(Xrange, Yrange, type="n")
31
# plot variables one X/Y pair at a time
32
for (i in 1:length(Xvars)) {
46
.rk.rerun.plugin.link(plugin="rkward::scatterplot", settings="cex.text=1\ncol.text=c ('black', 'red')\ncolor.string=each\nisCex.string=all\nisPch.string=all\npch.text=1\nplotoptions.add_grid.state=0\nplotoptions.asp.real=0.00\nplotoptions.main.text=\nplotoptions.pointcolor.color.string=\nplotoptions.pointtype.string=\nplotoptions.sub.text=\nplotoptions.xaxt.state=\nplotoptions.xlab.text=\nplotoptions.xlog.state=\nplotoptions.xmaxvalue.text=\nplotoptions.xminvalue.text=\nplotoptions.yaxt.state=\nplotoptions.ylab.text=\nplotoptions.ylog.state=\nplotoptions.ymaxvalue.text=\nplotoptions.yminvalue.text=\npointtype.string=p\ntype_mode.string=all\nx.available=women[[\\\"weight\\\"]]\\nswiss[[\\\"Education\\\"]]\ny.available=women[[\\\"height\\\"]]\\nswiss[[\\\"Catholic\\\"]]", label="Run again")