Refactored brushing in scatter plot