changed init method for ScatterPlot