implemented for scatterplots