0

I'm trying to get a graph like this to show boxplot distributions for each age group:

Boxplots

But instead my plot looks like this: Not boxplots

How can I get the boxplots to show rather than the points? Why is my Y axis non numeric?

My data looks like this: My data

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,

UseR10085
  • 7,120
  • 3
  • 24
  • 54
Jackson Walker
  • 137
  • 1
  • 9
  • 1
    Because your data is not linear or skewed. You need to transform your data using `log10` or `BoxCox` transformation. – UseR10085 Feb 09 '20 at 05:48
  • Isn't it the same question as https://stackoverflow.com/questions/60132869/how-can-i-plot-multiple-box-plots-by-a-factor-on-a-single-ggplot – dww Feb 09 '20 at 21:04

0 Answers0