Updated figure code