'Draw a Histogram
- used by the Survey module'

def survey_hist(self, title, data, bins, min, max, xlabel=None, ylabel=None):

    fig = self.fig
    if (not fig):
        return 'Matplotlib    not    installed'
    from numpy import arange
    ax = fig.add_subplot(111)
    ax.hist(data, bins=bins, range=(min, max))
    left = arange(0, (bins + 1))
    if self.asInt:
        label = (left * int((max / bins)))
    else:
        label = ((left * max) / bins)
    ax.set_xticks(label)
    ax.set_xticklabels(label, rotation=30)
    ax.set_title(title)
    ax.set_xlabel(xlabel)
    ax.set_ylabel(ylabel)
