delete unused figure code