Error with q plot

Dear R coders,
I was trying to execute this code and started receiving this error and stopped me from proceed further. Any thoughts?

qplot(Customer_Rating$ProdQual,data=Customer_Rating,geom ="histogram",binwidth=10)+
+   labs(title = "Prod Qual")+labs(x="Ratings")+labs(y="Frequency")+
+   scale_y_continuous( breaks=c(1:5),minor_breaks=NULL)+
+   scale_x_continuous( breaks=c(1:10),minor_breaks=NULL)+
+   geom_vline(xintercept = mean(Customer_Rating$ProdQual),show.legend=TRUE,col="red")+
+   geom_vline(yintercept=median(Customer_Rating$ProdQual),show.legend=TRUE,col="blue")
Warning: Ignoring unknown parameters: yintercept
Error: geom_vline requires the following missing aesthetics: xintercept

The error message is self explanatory, on the last geom_vline() you are passing a yintercept argument instead of xintercept, and this makes no sence because a vertical line can't have an intercept with the y axis.

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

Thank you andrescrcs!!!!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.