diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-13 12:04:55 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-13 12:04:55 +0100 |
commit | d9d0beb9069d0e1e40499bcfd12b8204d4356b04 (patch) | |
tree | 2b2ab593bd3aff075e48260d0ce63b4e534048b0 /main.cpp | |
parent | b1c4eac81a46c41ff9f36f4226b9058bbb379d3b (diff) |
Scatterplot: individual glyph opacity methods & signals.
* Removed code that handles selection coordination between cpPlot
and full data plot from main
* Full plot has control points invisible (opacity = 0) by default
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -61,7 +61,7 @@ int main(int argc, char **argv) arma::vec labels = m->labels(); arma::uword n = X.n_rows; - int cpSize = (int) (3 * sqrt(n)); + int cpSize; arma::uvec cpIndices; arma::mat Ys; @@ -73,6 +73,7 @@ int main(int argc, char **argv) cpIndices.load(indicesFilename.toStdString(), arma::raw_ascii); cpSize = cpIndices.n_elem; } else { + cpSize = (int) (3 * sqrt(n)); // cpIndices = relevanceSampling(X, cpSize); cpIndices = arma::randi<arma::uvec>(cpSize, arma::distr_param(0, n-1)); } @@ -136,7 +137,7 @@ int main(int argc, char **argv) QObject::connect(cpPlot, SIGNAL(xyInteractivelyChanged(const arma::mat &)), m, SLOT(setCP(const arma::mat &))); - // Update projection as the cp is modified + // Update projection as the cp are modified InteractionHandler interactionHandler(X, cpIndices); m->setInteractionHandler(&interactionHandler); QObject::connect(cpPlot, SIGNAL(xyChanged(const arma::mat &)), @@ -148,11 +149,11 @@ int main(int argc, char **argv) m->setTechnique(InteractionHandler::TECHNIQUE_LAMP); // Linking between selections in cp plot and full dataset plot - SelectionHandler selectionHandler(cpIndices); - QObject::connect(cpPlot, SIGNAL(selectionChanged(const QSet<int> &)), - &selectionHandler, SLOT(setSelection(const QSet<int> &))); - QObject::connect(&selectionHandler, SIGNAL(selectionChanged(const QSet<int> &)), - plot, SLOT(setSelection(const QSet<int> &))); + //SelectionHandler selectionHandler(cpIndices); + //QObject::connect(cpPlot, SIGNAL(selectionChanged(const QSet<int> &)), + // &selectionHandler, SLOT(setSelection(const QSet<int> &))); + //QObject::connect(&selectionHandler, SIGNAL(selectionChanged(const QSet<int> &)), + // plot, SLOT(setSelection(const QSet<int> &))); // Connections between history graph and cp plot //HistoryGraph *history = engine.rootObjects()[0]->findChild<HistoryGraph *>("history"); @@ -176,6 +177,11 @@ int main(int argc, char **argv) cpPlot->setXY(Ys, false); cpPlot->update(); + arma::vec plotOpacities(X.n_rows); + plotOpacities.fill(0.4f); + plotOpacities(cpIndices).fill(0.0f); + plot->setOpacityData(plotOpacities); + auto ret = app.exec(); skelft2DDeinitialization(); |