replace a figure