This function draws the scatterplot based on user selections from the GUI interface.
Internal function.