initial commit of figure 1 code

Needs updating to produce both panels.