Adds code to return own plot object when creating a new one.