Horizontal scaling for histogram

A similar question was asked here: Shift bins under modulus