updated analyze.py to plot charts