Hello Uwe,
we get our data vom vacuum transmitter and the range is normaly between 2000 and 1E-10, and if
the data changes over time or the loaded data is e.g. from 995 to 1e-4, we don't have a problem.
But if the pressure value is nearly constant, means ymin=0.955 and ymax=0.956 for 1 minute e.g.,
we don't see a scale (right scale in attached picture).
If found in QwtLogScaleEngine, that it will be checked if the delta Y is lower that logBase and that happens
in our case. In qwt_scale_engine.cpp we jump into this, because we have less than on step i guess:
line 814 to 838 from qwt_scale_engine.cpp:
if ( interval.maxValue() / interval.minValue() < logBase )
{
// scale width is less than one step -> try to build a linear scale
linearScaler.setAttributes( attributes() );
linearScaler.setReference( reference() );
linearScaler.setMargins( lowerMargin(), upperMargin() );
linearScaler.autoScale( maxNumSteps, x1, x2, stepSize );
QwtInterval linearInterval = QwtInterval( x1, x2 ).normalized();
linearInterval = linearInterval.limited( LOG_MIN, LOG_MAX );
if ( linearInterval.maxValue() / linearInterval.minValue() < logBase )
{
// the aligned scale is still less than one step
if ( stepSize < 0.0 )
stepSize = -qwtLog( logBase, qAbs( stepSize ) );
else
stepSize = qwtLog( logBase, stepSize ); // THIS IS CALLED FINALY
return;
}
}
if ( interval.maxValue() / interval.minValue() < logBase )
{
// scale width is less than one step -> try to build a linear scale
QwtLinearScaleEngine linearScaler;
linearScaler.setAttributes( attributes() );
linearScaler.setReference( reference() );
linearScaler.setMargins( lowerMargin(), upperMargin() );
linearScaler.autoScale( maxNumSteps, x1, x2, stepSize );
QwtInterval linearInterval = QwtInterval( x1, x2 ).normalized();
linearInterval = linearInterval.limited( LOG_MIN, LOG_MAX );
if ( linearInterval.maxValue() / linearInterval.minValue() < logBase )
{
// the aligned scale is still less than one step
if ( stepSize < 0.0 )
stepSize = -qwtLog( logBase, qAbs( stepSize ) );
else
stepSize = qwtLog( logBase, stepSize ); // THIS IS CALLED FINALY
return;
}
}
To copy to clipboard, switch view to plain text mode
The interessing point is, if i zoom in OR our with QwtMagnifier i can see the scale again.
Thx
Bookmarks