Add more examples from the HP data-set.
[matplotlib-cdsw] / 004-plot-histogram.py
1 """
2 004-plot-histogram.py 
3
4 Plot a histogram of edit sizes 
5
6 """
7
8 import matplotlib.pyplot as plt 
9 import load_hp_data as hp
10
11 plt.style.use('ggplot')
12
13 fig, ax = plt.subplots(1)
14 ax.hist(hp.columns['size'], bins=1000)
15 ax.set_xlabel('Size of the edit')
16 ax.set_ylabel('')
17 ax.set_title('Edit size distribution')
18
19 # Maybe don't really need that axis to be so long:
20 # ax.set_xlim([0, 200000])
21
22 plt.show()

Benjamin Mako Hill || Want to submit a patch?