script for plot3