R scripts for Fig 2

scripts for generating panels in Fig 2