aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-01-12 17:37:20 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2016-01-12 17:37:26 +0100
commita5378abcbb3d8ee8dc3b76380dd50a43a2eec22e (patch)
tree11f29228bdb020f953fbabcfa397b9254d89db4a /main.cpp
parent44914a9253408d6903272f69bacac1a9144b0e18 (diff)
Scatterplot: autoscaling & signals.
* Added methods & signal/slots to handle auto/manual scaling * The subsample plot is now scaled by the full data plot, naturally superimposing them * LAMP was corrected in order to always preserve the mapping of the subsample
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 90396ed..3026b1e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -161,12 +161,17 @@ int main(int argc, char **argv)
//QObject::connect(history, SIGNAL(currentItemChanged(const arma::mat &)),
// subsamplePlot, SLOT(setXY(const arma::mat &)));
+ QObject::connect(plot, SIGNAL(scaleChanged(const LinearScale<float> &, const LinearScale<float> &)),
+ subsamplePlot, SLOT(setScale(const LinearScale<float> &, const LinearScale<float> &)));
+
BarChart *barChart = engine.rootObjects()[0]->findChild<BarChart *>("barChart");
barChart->setValues(arma::randn<arma::vec>(100));
//history->addHistoryItem(Ys);
plot->setColorScale(&colorScale);
plot->setColorData(labels, false);
+
+ subsamplePlot->setAutoScale(false);
subsamplePlot->setColorData(labels(sampleIndices), false);
subsamplePlot->setXY(Ys, false);
subsamplePlot->update();