We’re now going to take the program from homework 5 and make it work with matplotlib. You can use your original solution to homework 5 as a starting point. You have 4 tasks: 1.
Many of you didn’t store the x/y data internally in the object you created. While this was ok for homework 5, please correct it for this homework assignment, as we are going to be extending this object in future homework assignments. That is, please ‘fix’ your object so the data is stored in the object and not taken as parameters to the various methods. Also make sure there is a separate method (other than just __init__) for reading data from disk.
If neceesary, change the data storage of the x/y data from Python lists to use numpy arrays.
Modify the histogram method so it makes use of matplotlib to display the results of the histogram graphically. Feel free to redo the histogram calculation using capabilities of numpy/scipy as well, though this is not required.
Add an additional method to plot the x/y data as a 2-D line plot using matplotlib.