create dataframe for plotting.