Added py plotting code