Added code to generate test figures.