update numbers of figures and redraw