first working version of the scatterplot