added several new methods to plot2d class