Wrap figure drawing in a try/finally block