Fix bug where scatterplot stopped working when n=1.