From 60a0bfb863aa2a05bafd943423c284f5c2d68863 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 25 Jan 2016 19:55:52 +0100 Subject: Scatterplots & splat now share the same scaling. --- mapscalehandler.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mapscalehandler.cpp (limited to 'mapscalehandler.cpp') diff --git a/mapscalehandler.cpp b/mapscalehandler.cpp new file mode 100644 index 0000000..9e25c29 --- /dev/null +++ b/mapscalehandler.cpp @@ -0,0 +1,15 @@ +#include "mapscalehandler.h" + +MapScaleHandler::MapScaleHandler() + : m_sx(0.0f, 1.0f, 0.0f, 1.0f) + , m_sy(0.0f, 1.0f, 0.0f, 1.0f) +{ +} + +void MapScaleHandler::scaleToMap(const arma::mat &Y) +{ + m_sx.setDomain(Y.col(0).min(), Y.col(0).max()); + m_sy.setDomain(Y.col(1).min(), Y.col(1).max()); + + emit scaleChanged(m_sx, m_sy); +} -- cgit v1.2.3