Closed teunbrand closed 4 years ago
This now works:
library(ggplot2)
library(ggh4x)
df <- data.frame(
x = seq(0, 10, length.out = 100),
y = sin(seq(0, 10, length.out = 100)*2)
)
ggplot(df) +
stat_rle(aes(x, label = y > 0.5),
align = "center") +
geom_point(aes(x, y))
Created on 2020-06-02 by the reprex package (v0.3.0)
To do basically this, but then in a stat function:
Created on 2020-05-22 by the reprex package (v0.3.0)