0

I'm trying to create a graph depicting the mean percentages of my data.

I've used geom_jitter combined with geom_smooth, to do this, but the ribbon of geom_smooth is exceeding 100% which isn't possible.

Is there a way to limit the extent the ribbon can reach?

Here is my code:

    Impingement_Graphs <- ggplot() +
  geom_jitter(data = Impingedata, stat = "summary", fun = "mean", mapping = aes(x = AV, y = `impg %`), colour = "black") +
  geom_smooth(data = Impingedata, mapping = aes(x = AV, y = `impg %`), colour = "black") +
  facet_wrap(~Stage) +
  theme(
    panel.background = element_blank(),
    panel.grid = element_blank()
  )

Cheers in advance

  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Jan 20 '22 at 06:26
  • Please provide a small example of your data using `dput()`. – Claudiu Papasteri Jan 28 '22 at 11:24

0 Answers0