Updated code to set NSE datasource and to save graphs to jpg format.

Modified Line Numbers: 62-68, 183-189