问题
I'm trying to get a graph like this to show boxplot distributions for each age group:
But instead my plot looks like this:
How can I get the boxplots to show rather than the points? Why is my Y axis non numeric?
My data looks like this:
And here's the plot code I am trying:
p2 <- ggplot(data = popSample, aes(x = AGEGRP, y = TOT_POP)) +
geom_boxplot(aes(group = AGEGRP)) +
scale_x_discrete() +
theme_light()
p2
Thank you for helping someone who is learning,
来源:https://stackoverflow.com/questions/60133762/how-do-i-show-multiple-boxplots-showing-distribution-using-ggplot