From a5378abcbb3d8ee8dc3b76380dd50a43a2eec22e Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 12 Jan 2016 17:37:20 +0100 Subject: 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 --- main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.cpp') 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 &, const LinearScale &)), + subsamplePlot, SLOT(setScale(const LinearScale &, const LinearScale &))); + BarChart *barChart = engine.rootObjects()[0]->findChild("barChart"); barChart->setValues(arma::randn(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(); -- cgit v1.2.3