fixed so data can be dynamically chosen and plotted in the scatter plot