diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-03 18:57:43 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-03 13:56:05 -0800 |
commit | bea289e3141a982cc80623f509619e56e189b6c1 (patch) | |
tree | 9334828d1fbcea63c365f3e3ddccab88060dc9fe /stats/statsview.h | |
parent | 9beec46e22cbe53b011c10f204d56b3750a87edb (diff) | |
download | subsurface-bea289e3141a982cc80623f509619e56e189b6c1.tar.gz |
statistics: clip regression line
A steep regression line would shoot out of the chart. Therefore,
clip to the y = minY and y = maxY lines.
QtGraphicsScene has its own clipping routines, but they are
very general, so let's do this trivial case by hand.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/statsview.h')
-rw-r--r-- | stats/statsview.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stats/statsview.h b/stats/statsview.h index c65a4232a..1ef88b96c 100644 --- a/stats/statsview.h +++ b/stats/statsview.h @@ -110,7 +110,7 @@ private: LineMarker(QPointF from, QPointF to, QPen pen, QtCharts::QAbstractSeries *series); }; - void addLinearRegression(double a, double b, double minX, double maxX, QtCharts::QAbstractSeries *series); + void addLinearRegression(double a, double b, double minX, double maxX, double minY, double maxY, QtCharts::QAbstractSeries *series); void addHistogramMarker(double pos, double low, double high, const QPen &pen, bool isHorizontal, QtCharts::QAbstractSeries *series); StatsState state; |