Add figure creation to test script