update figure