import csv
import string
with open('durations.txt', 'rb') as csvfile:
#determine csv format and read the data
dialect = csv.Sniffer().sniff(csvfile.read(1024))
csvfile.seek(0)
reader = csv.reader(csvfile, dialect)
#create container for data
for data in reader:
sdata = numpy.array(data)
# convert data to minutes
fdata = sdata.astype(float) / 60.
pyplot.hist(fdata, bins=100, histtype='bar', color='cyan')
pyplot.xticks(numpy.arange(0, max(fdata)+1, 1.0))
#make the plot bigger
fig = pyplot.gcf()
fig.set_size_inches(12, 8)