# HG changeset patch # User Hasan Yavuz Ă–ZDERYA # Date 2017-10-05 14:32:19 # Node ID 170d571f3be7bd63b21e1747d2df28ae7932688f # Parent 2afe3010d3c1b6abc03645d8db6aa0513eaf7ee2 fix empty space at the right of x scale diff --git a/src/barplot.cpp b/src/barplot.cpp --- a/src/barplot.cpp +++ b/src/barplot.cpp @@ -35,7 +35,8 @@ BarPlot::BarPlot(ChannelManager* channel void BarPlot::update() { - setAxisScale(QwtPlot::xBottom, 0, _channelMan->numOfChannels(), 1); + // Note: -0.99 is used instead of -1 to handle the case of `numOfChannels==1` + setAxisScale(QwtPlot::xBottom, 0, _channelMan->numOfChannels()-0.99, 1); barChart.resample(); replot(); }