How can I correct this problem in the ploting?