changed to use pickle instead of json.
include pyplot and pylab