function inthist(g,xl,yl)
% Histogram plotting with integer increment in variable
if (nargin < 3)
  yl = 'Count';
endif
if (nargin < 2)
  xl = 'Value';
endif
hist(g,[-0.5:1:(max(g)+0.5)])
axis('auto')
xlabel(xl)
ylabel(yl)
replot