From 3335d573dc11c939e6523bde4459b1d04989cd9f Mon Sep 17 00:00:00 2001 From: "Randall C. O'Reilly" Date: Tue, 8 Oct 2024 00:05:25 -0700 Subject: [PATCH] estats cluster plot takes distance function -- faces needs MinDist, not ContrastDist --- estats/plots.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/estats/plots.go b/estats/plots.go index 4e1232d..1e2ecba 100644 --- a/estats/plots.go +++ b/estats/plots.go @@ -27,12 +27,12 @@ func ConfigPCAPlot(plt *plotcore.PlotEditor, dt *table.Table, nm string) { // ClusterPlot does one cluster plot on given table column name // and label name -func ClusterPlot(plt *plotcore.PlotEditor, ix *table.IndexView, colNm, lblNm string) { +func ClusterPlot(plt *plotcore.PlotEditor, ix *table.IndexView, colNm, lblNm string, dfunc clust.DistFunc) { nm, _ := ix.Table.MetaData["name"] smat := &simat.SimMat{} smat.TableColumnStd(ix, colNm, lblNm, false, metric.Euclidean) pt := &table.Table{} - clust.Plot(pt, clust.Glom(smat, clust.ContrastDist), smat) + clust.Plot(pt, clust.Glom(smat, dfunc), smat) plt.Name = colNm plt.Options.Title = "Cluster Plot of: " + nm + " " + colNm plt.Options.XAxis = "X"