updating plot_df_dist function