pointList::const_iterator aIt;
double coeff = 0.0;
for (aIt = myPoints.begin(); aIt != myPoints.end(); ++aIt) {
- aMinY = qMin( aMinY, myScale * (*aIt).y );
- if((*aIt).minDeviation(coeff))
- aMinY = qMin( aMinY, coeff );
+ (*aIt).minDeviation(coeff);
+ aMinY = qMin( aMinY, myScale * (*aIt).y - coeff);
}
return aMinY;
}
pointList::const_iterator aIt;
double coeff = 0.0;
for (aIt = myPoints.begin(); aIt != myPoints.end(); ++aIt) {
- aMaxY = qMax( aMaxY, myScale * (*aIt).y);
- if((*aIt).maxDeviation(coeff))
- aMaxY = qMax( aMaxY, coeff);
+ (*aIt).maxDeviation(coeff);
+ aMaxY = qMax( aMaxY, myScale * (*aIt).y + coeff);
}
return aMaxY;
}
xi = x(i);
yi = y(i);
xp = xMap.transform(xi);
- ytop = yMap.transform(max);
- ybtm = yMap.transform(min);
+ ytop = yMap.transform(yi + max);
+ ybtm = yMap.transform(yi - min);
tickl = xp - tickSz;
tickr = xp + tickSz;
painter->drawLine(tickl,ytop,tickr,ytop);