modified 2dplot class