generate figures for three-stage