function plotisihist(isis, binwidth)
% Plot and annotate histogram of interspike intervals.
%
% Arguments:
%   isis: vector of interspike intervals in seconds
%   binwidth: width in seconds to be used for the ISI bins
    [pdf, centers] = isihist(isis, binwidth);
    bar(1000.0*centers, pdf);     % milliseconds on x-axis
    xlabel('ISI [ms]')
    ylabel('p(ISI) [1/s]')
    misi = mean(isis);
    sdisi = std(isis);
    text(0.95, 0.8, sprintf('mean=%.1f ms', 1000.0*misi), ...
         'Units', 'normalized', 'HorizontalAlignment', 'right')
    text(0.95, 0.7, sprintf('std=%.1f ms', 1000.0*sdisi), ...
         'Units', 'normalized', 'HorizontalAlignment', 'right')
    text(0.95, 0.6, sprintf('CV=%.2f', sdisi/misi), ...
         'Units', 'normalized', 'HorizontalAlignment', 'right')
end