updated createfigure.m.