Reqworking plotting code to make more consistent