Updated figures code