Fixed offset in histogram with non-log time

This commit is contained in:
Dedmen Miller (Dedmenmiller) 2019-01-24 14:16:23 +00:00
parent c67d91c6ac
commit 72966a24a3

View File

@ -5043,7 +5043,7 @@ void View::DrawFindZone()
while( zit != sorted.end() && *zit == 0 ) zit++; while( zit != sorted.end() && *zit == 0 ) zit++;
for( int64_t i=0; i<numBins; i++ ) for( int64_t i=0; i<numBins; i++ )
{ {
const auto nextBinVal = ( i+1 ) * zmax / numBins; const auto nextBinVal = tmin + ( i+1 ) * zmax / numBins;
auto nit = std::lower_bound( zit, sorted.end(), nextBinVal ); auto nit = std::lower_bound( zit, sorted.end(), nextBinVal );
const auto distance = std::distance( zit, nit ); const auto distance = std::distance( zit, nit );
const auto timeSum = std::accumulate( zit, nit, int64_t( 0 ) ); const auto timeSum = std::accumulate( zit, nit, int64_t( 0 ) );