MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / moveRange

Method moveRange

qcustomplot/qcustomplot.cpp:8415–8429  ·  view source on GitHub ↗

! If the scale type (\ref setScaleType) is \ref stLinear, \a diff is added to the lower and upper bounds of the range. The range is simply moved by \a diff. If the scale type is \ref stLogarithmic, the range bounds are multiplied by \a diff. This corresponds to an apparent "linear" move in logarithmic scaling by a distance of log(diff). */

Source from the content-addressed store, hash-verified

8413 corresponds to an apparent "linear" move in logarithmic scaling by a distance of log(diff).
8414*/
8415void QCPAxis::moveRange(double diff)
8416{
8417 QCPRange oldRange = mRange;
8418 if (mScaleType == stLinear)
8419 {
8420 mRange.lower += diff;
8421 mRange.upper += diff;
8422 } else // mScaleType == stLogarithmic
8423 {
8424 mRange.lower *= diff;
8425 mRange.upper *= diff;
8426 }
8427 emit rangeChanged(mRange);
8428 emit rangeChanged(mRange, oldRange);
8429}
8430
8431/*!
8432 Scales the range of this axis by \a factor around the center of the current axis range. For

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected