Fixed the Figure 4 plotting and data production scripts