updated to account for the stored json in the matplotlib graph