
James A. answered 07/23/20
Tutor
4.9
(247)
Math and Science Tutor
Add group=1 to your ggplot.
For instance:
ggplot(df, aes(x=xvar, y=yvar, group=1)
This tells ggplot that you only have one bit of information per group. This is important when you are dealing with calculated averages, as ggplot tries to do that for you.