Open Ben-Downes opened 6 years ago
for chapter 10: def plot_histogram(points, bucket_size, title=""): histogram = make_histogram(points, bucket_size) plt.bar(list(histogram.keys()), list(histogram.values()), width=bucket_size) plt.title(title) plt.show()
Looks like in python 3 they changed maps to be non-iterables so the code needs to look like: plt.plot(x, list(map(derivative_estimate, x)), 'b+')