Updated plotting function to output the data.