replacing plotting scripts