add P_plot for plot