update plot_ped and plot_var, fix bugs