Script for plot4 R and plot 4