Fix arithmetic errors in histogram display.
Really fix the rows/cols swapped bug.