Update plotting code.