Added plotting code.