uploading plot_dist_by_var  function