add the plot_hist function to func.py, as well as helper function make_hist