Adding auto scale functionality to scatterplot