Copied graphing script from master.
Modifications to graph script.