It seems like normal mixtures platform might be using it's own scatterplot matrix which isn't that easy to access or manipulate. You could save the clusters to your table and then use Scatterplot Matrix to create the plot
Scatterplot Matrix(
Y(:height, :weight),
Group(:Cluster),
Matrix Format("Lower Triangular"),
Density Ellipses(1),
Ellipses Coverage(0.4),
Group By(:Cluster)
);
but this won't let you get the points. To get this you can use Fit Y by X platform (use cluster as By column).
This is one place where I know you can select the points inside of the ellipses
As I'm not really sure what you are trying to do (are you just trying to select the points or also have some sort of a report) below is script which does a lot of things
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
vlb = V List Box(
nm = dt << Normal Mixtures(
Y(:height, :weight),
{Mixtures Tolerance(0.00000001), Mixtures MaxIter(300), Mixtures N Starts(30),
Outlier Cluster(0), Diagonal Variance(0), Number of Clusters(2), Go()}
)
)
);
cols = Associative Array(dt << Get Column Names("String"));
nm << Save Clusters;
cluster_col = Associative Array(dt << Get Column Names("String"));
cluster_col << Remove(cols);
cluster_col = (cluster_col << get keys)[1];
vlb << Append(
sm = dt << Scatterplot Matrix(
Y(:height, :weight),
Group(:Cluster),
Matrix Format("Lower Triangular"),
Shaded Ellipses(1),
Ellipses Coverage(0.4),
Group By(Eval(cluster_col))
);
);
biv = dt << Bivariate(Y(:weight), X(:height), By(:Cluster), Invisible);
biv << Density Ellipse(0.4, {Select Points Inside});
new_col = dt << New Column("Ellipse", Numeric, Nominal, Formula(
If(Selected() & :Cluster == 1,
1
, Selected() & :Cluster == 2,
-1
,
0
)
));
dt << run formulas;
new_col << Delete Formula;
dt << clear select;
// Just for visualization purposes
gb = dt << Graph Builder(
Size(653, 491),
Show Control Panel(0),
Variables(
X(:height),
Y(:weight),
Overlay(:Cluster, Overlay Encoding("Style")),
Color(:Ellipse)
),
Elements(Points(X, Y, Legend(3)))
);
For(i = 1, i <= 2, i++,
ls = Report(biv[i])[FrameBox(1)] << Find Seg(LineSeg(1));
xs = ls << Get X Values;
ys = ls << Get y Values;
Eval(EvalExpr(
Report(gb)[FrameBox(1)] << Add Graphics Script(
Line(Expr(xs), Expr(ys));
)
));
);
//biv << close window;
-Jarmo