Error when creating ggplot

Does anyone know why I get this error when creating the ggplot for the train data set? ggplot(train, aes(x = Pclass, fill = Survived))+geom_histogram(width = 0.5) + xlab(“Pclass”)+ylab(“Total Count”)+labs(fill = “survived”) Error: StatBin requires a continuous x variable the x variable is discrete. Perhaps you want stat=”count”?

Link to Full Article: Error when creating ggplot

Pin It on Pinterest

Share This

Join Our Newsletter

Sign up to our mailing list to receive the latest news and updates about and the Informed.AI Network of AI related websites which includes Events.AI, Neurons.AI, Awards.AI, and Vocation.AI

You have Successfully Subscribed!