diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2015-05-18 18:33:50 -0300 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2015-05-18 18:33:50 -0300 |
commit | 7c4333eed407886114f33d803a3199c50556e4e3 (patch) | |
tree | 0f46c89bc7eaa08994faa1095b480baaa1f64c72 /main.cpp | |
parent | 54571b4a4dcc076923325ee09ad348f389fc25a5 (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 schene
graph.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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(); |