better key func for scatter plots