Skip to content

Commit ddc862c

Browse files
committed
Fix color mapping
1 parent 2236414 commit ddc862c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ScatterplotPlugin.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,10 @@ void ScatterplotPlugin::loadColors(const Dataset<Clusters>& clusters)
603603
{
604604
for (size_t i = 0; i < static_cast<size_t>(clusterVec.size()); i++)
605605
{
606-
const auto color = clusterVec[i].getColor();
607-
localColors[i] = Vector3f(color.redF(), color.greenF(), color.blueF());
606+
const auto& cluster = clusterVec[i];
607+
const auto color = cluster.getColor();
608+
609+
localColors[cluster.getIndices()[0]] = Vector3f(color.redF(), color.greenF(), color.blueF());
608610
}
609611

610612
}

0 commit comments

Comments
 (0)