Finds the correct dataframe for plotting y versus x
Name of x-variable.
Name of y-variable.
The dataframe that contains the x and y variables.
The name of the dataframe.