Changed plot generation method/minor changes