aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interactionhandler.cpp2
-rw-r--r--main.cpp3
-rw-r--r--scatterplot.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/interactionhandler.cpp b/interactionhandler.cpp
index fab3c75..217f4a5 100644
--- a/interactionhandler.cpp
+++ b/interactionhandler.cpp
@@ -23,7 +23,7 @@ void InteractionHandler::setSubsample(const arma::mat &Ys)
break;
}
- arma::mat Y(embedding.n_rows, embedding.n_cols);
+ arma::mat Y(embedding.n_rows, embedding.n_cols + 1);
Y.cols(0, embedding.n_cols - 1) = embedding;
Y.col(Y.n_cols - 1) = m_labels;
diff --git a/main.cpp b/main.cpp
index 3f2a85e..380d311 100644
--- a/main.cpp
+++ b/main.cpp
@@ -14,6 +14,7 @@ int main(int argc, char **argv)
qmlRegisterType<Scatterplot>("PM", 1, 0, "Scatterplot");
+ // Set up multisampling
QSurfaceFormat fmt;
fmt.setSamples(16);
QSurfaceFormat::setDefaultFormat(fmt);
@@ -46,7 +47,7 @@ int main(int argc, char **argv)
interactionHandler.get(), SLOT(setSubsample(const arma::mat &)));
QObject::connect(interactionHandler.get(), SIGNAL(subsampleChanged(const arma::mat &)),
plot, SLOT(setData(const arma::mat &)));
-
+ interactionHandler.get()->setSubsample(Ys);
}
return app.exec();
diff --git a/scatterplot.cpp b/scatterplot.cpp
index dd8d378..3335e9e 100644
--- a/scatterplot.cpp
+++ b/scatterplot.cpp
@@ -150,7 +150,7 @@ QSGNode *Scatterplot::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
y = PADDING + (row[1] - ymin) / (ymax - ymin) * (height() - 2*PADDING) + yt * selected;
QSGGeometry *geometry = static_cast<QSGGeometryNode *>(glyphNode)->geometry();
- geometry->setDrawingMode(m_selectedGlyphs[i] ? GL_POLYGON : GL_LINE_LOOP);
+ geometry->setDrawingMode(!m_selectedGlyphs[i] ? GL_POLYGON : GL_LINE_LOOP);
updateCircleGeometry(geometry, GLYPH_SIZE, x, y);
glyphNode->markDirty(QSGNode::DirtyGeometry);
glyphNode = glyphNode->nextSibling();