Closed
Description
Why does stat_function or geom_function fail to plot high frequency sine waves properly?
reprex:
library(ggplot2)
plots <- purrr::map(c(1,2,3,4,5,seq(10,100,10)), function(y) {
ggplot(data.frame(x=seq(0,20,length.out=100)), aes(x)) +
stat_function(fun = ~sin(y*.x))
})
patchwork::wrap_plots(plots)
Metadata
Metadata
Assignees
Labels
No labels