2

I'm plotting with ggplot2 and I would like to know if there is a way to capture the points generated by stat_smooth or at least know what parameters it used.

    ggplot(data=ICLR, aes(x=  AÑO_MES, y=  ICLRr, size=PatMensualFondo ))  + 
    xlab("Patrimonio Medio") + ylab("% Cobertura Media") + 
    stat_smooth( mapping = aes (group = 1)) +
    geom_point() 

For more than 1000 points I get this : " geom_smooth: method="auto" and size of largest group is >=1000, so using gam with formula: y ~ s(x, bs = "cs"). Use 'method = x' to change the smoothing method. " I know that it used gam method , but what else ?

If I can't capture data points as it is said in this thread :

Can one extract model fit parameters after a ggplot stat_smooth call?

How can I replicate what stat_smooth did ?

Community
  • 1
  • 1
Tomás Ayala
  • 107
  • 2
  • 15

0 Answers0