Here's the ggplot I have:
listTimelinePlot <- ggplot(listDf, aes(x=N, y=Measurement_Value,color="List")) +
xlab("n") +
ylab("Time to append n items") +
scale_x_log10() +
scale_y_log10() +
geom_line() +
geom_point()
N
is an array of integers that may contain duplicate values. As a result, in the resulting plot there are multiple points that share the same x-value:
How do I make it so that only one point is displayed per x-value, namely a point with its y-value equal to the average of the points' y-values? I'm assuming that the 'joints' created by geom_line()
meet at the mean y-value.