Script for plot 3