Constructing a scatter plot