% matplotlib inline
from numpy import *
from matplotlib.pyplot import plot
import matplotlib.pyplot as plt
import numpy as np
See the other files in this folder for an explanation of what's what here, and feb2_output.txt for what we're plotting.
from feb2 import *
(entropy, compression) = entropies_and_compressions()
sizes = range(1, 1+len(entropy['stream1.txt']))
entropy, compression
def plotit(filename):
plt.figure()
plt.title(filename)
plt.axis([0, 10, 0, 1.1])
plot(sizes, entropy[filename], color='green', marker='o', linestyle='None', label='entropy')
plot(sizes, compression[filename], color='red', marker='s', linestyle='None', label='compression')
plt.legend()
plt.show()
plotit('stream1.txt')
plotit('stream2.txt')