diff options
author | 0xloem <0xloem@gmail.com> | 2021-05-27 10:57:08 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-05-27 17:09:02 -0400 |
commit | 04f1eb0f98682b8f3a0924273262eacec41355ea (patch) | |
tree | d239e18b9a18fe275a44a7b43787ac91a3187ce7 | |
parent | eed7b78d36a1bd1c394f139b9bb7ef899a8fb060 (diff) |
Fix vector margin for non-frequency data
Signed-off-by: 0xloem <0xloem@gmail.com>
-rw-r--r-- | gr-qtgui/lib/VectorDisplayPlot.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gr-qtgui/lib/VectorDisplayPlot.cc b/gr-qtgui/lib/VectorDisplayPlot.cc index 2ea3ada783..0d0f3c818f 100644 --- a/gr-qtgui/lib/VectorDisplayPlot.cc +++ b/gr-qtgui/lib/VectorDisplayPlot.cc @@ -369,9 +369,10 @@ void VectorDisplayPlot::clearMinData() void VectorDisplayPlot::_autoScale(double bottom, double top) { - // Auto scale the y-axis with a margin of 10 dB on either side. - d_ymin = bottom - 10; - d_ymax = top + 10; + // Auto scale the y-axis with a margin of 1% on either side + double margin = (top - bottom) / 100; + d_ymin = bottom - margin; + d_ymax = top + margin; setYaxis(d_ymin, d_ymax); } |