edit figure code