Added plotting to the testing script