X-Git-Url: https://projects.mako.cc/source/matplotlib-cdsw/blobdiff_plain/0a6b1b4db717da540e57c15eb7506d2d8f75da58..7bd9bbbbb11d7585b76e63e354c0c779d5a8c547:/004-plot-histogram.py diff --git a/004-plot-histogram.py b/004-plot-histogram.py new file mode 100644 index 0000000..785a068 --- /dev/null +++ b/004-plot-histogram.py @@ -0,0 +1,22 @@ +""" +004-plot-histogram.py + +Plot a histogram of edit sizes + +""" + +import matplotlib.pyplot as plt +import load_hp_data as hp + +plt.style.use('ggplot') + +fig, ax = plt.subplots(1) +ax.hist(hp.columns['size'], bins=1000) +ax.set_xlabel('Size of the edit') +ax.set_ylabel('') +ax.set_title('Edit size distribution') + +# Maybe don't really need that axis to be so long: +# ax.set_xlim([0, 200000]) + +plt.show()