aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-05-18 18:33:50 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-05-21 18:09:02 -0300
commita96f9f1a2688c215c478cfbee5748b4bb2043a43 (patch)
tree0f46c89bc7eaa08994faa1095b480baaa1f64c72 /main.cpp
parent54571b4a4dcc076923325ee09ad348f389fc25a5 (diff)
Updated UI.
- Removed unnecessary UI elements from QML file; - Added the ColorScale class and implemented glyph color mapping from class labels; - Mark geometry nodes of individual glyphs as dirty when updating the scene graph.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index fb6ab1e..a00d884 100644
--- a/main.cpp
+++ b/main.cpp
@@ -35,9 +35,12 @@ int main(int argc, char **argv)
if (argc > 1) {
arma::mat X;
X.load(argv[1], arma::raw_ascii);
- arma::mat projection = getProjection(X);
- Scatterplot *plot = view.rootObject()->findChild<Scatterplot *>("plot", Qt::FindDirectChildrenOnly);
- plot->setData(projection);
+
+ Scatterplot *plot = view.rootObject()->findChild<Scatterplot *>("plot");
+ arma::mat scatterData(X.n_rows, 3);
+ scatterData.cols(0, 1) = getProjection(X.cols(0, X.n_cols - 2));
+ scatterData.col(2) = X.col(X.n_cols - 1);
+ plot->setData(scatterData);
}
view.show();