version to generate graph for paper figure 4