resize the figure