Script for plot 4