X-Git-Url: https://projects.mako.cc/source/matplotlib-cdsw/blobdiff_plain/7bd9bbbbb11d7585b76e63e354c0c779d5a8c547..HEAD:/003-plot-timeseries.py diff --git a/003-plot-timeseries.py b/003-plot-timeseries.py index ec98776..f0fe255 100644 --- a/003-plot-timeseries.py +++ b/003-plot-timeseries.py @@ -23,11 +23,12 @@ ax.set_ylabel('Size of the edit') plt.show() -# Challenge: plot the relationship between edit size. Use +# Challenge: Is edit size related to how long it's been since the last edit? +# => Plot the relationship between edit size and the time since the last edit: -## Hint 1: +## Hint 1: the number of seconds between two edits is: -#delta_time1 = hp.columns['timestamp'][1] - hp.columns['timestamp'][0] +#delta_time1 = (hp.columns['timestamp'][1] - hp.columns['timestamp'][0]).total_seconds() ## Hint 2: @@ -36,3 +37,9 @@ plt.show() # ax.plot([1,2,3], [2,4,8], '.') # ax.plot([1,2,3], [2,4,8], 'r.') + +# And see online documentation here: +# http://matplotlib.org/api/pyplot_summary.html +# http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.plot + +