program define freqplot
	version 7.0
	syntax varlist(max=1)
	tempvar y
	qui egen `y' = group(`varlist')
	qui sum `y'
	local x = int(r(max)) - int(r(min)) + 1
	graph `varlist', histogram freq bin(`x')
end