Plotting functions of a variable in a dataset