modify plotting script