I am trying to plot a smoothed trendline but for various reasons I cannot use geom_smooth() to achieve my goal.
The data is in the format:
time | value | Group |
---|---|---|
1 | 124 | 1 |
1 | 452 | 2 |
2 | 49 | 1 |
2 | 453 | 2 |
3 | 788 | 1 |
3 | 652 | 2 |
4 | 356 | 1 |
4 | 452 | 2 |
The code I have so far is:
ggplot(data,
aes(x = time,
y = value,
color = Group)) +
geom_point() +
geom_xspline() +
theme(line = element_line(linewidth = 1))
This does not change the width of the geom_xspline(). Neither does geom_xspline(size = 2)
or
ggplot(data,
aes(x = time,
y = value,
color = Group,
size = 2)) +
geom_point() +
geom_xspline()