Added plotting scripts. Added extend option