R Ggplot2 Stat Function Misbehaviour With Log Scales Stack Overflow

R Ggplot2 Stat Function Misbehaviour With Log Scales Stack Overflow