Merged multiple plotting scripts into one