#!/usr/bin/env python3 import matplotlib.pyplot as plt data = [] with open('./0.25_1_pr.txt', 'r') as f: data.extend(map(float, f.readlines())) count, bins, ignored = plt.hist(data, 30) plt.show()