class MoreMath::Histogram

def display(output = $stdout, width = 65)

+prepare_display+
Display this histogram to +output+, +width+ is the parameter for
def display(output = $stdout, width = 65)
  if width.is_a?(String) && width =~ /(.+)%\z/
    percentage = Float($1).clamp(0, 100)
    width = (terminal_width * (percentage / 100.0)).floor
  end
  width > 15 or raise ArgumentError, "width needs to be >= 15"
  for r in rows
    output << output_row(r, width)
  end
  output << "max_count=#{max_count}\n"
  self
end