import numpy as np import matplotlib.pyplot as plt with open('out', 'rb') as fh: loaded_array = np.frombuffer(fh.read(), dtype=np.uint8) print loaded_array plt.plot(loaded_array) plt.show()