Home > Software design >  apparently correct rscript does not plot curve in ggplot 2
apparently correct rscript does not plot curve in ggplot 2

Time:12-13

I have tried different script options from other related questions but none seems to plot the desired curve, despite the script looks correct and runs... enter image description here

Or, with some styling choices (thanks Rui Barradas)

ggplot(d, aes(x = x, y = y))  
  geom_point(col="black", fill = "grey",alpha = 0.8, shape = 21, size = 2)  
  geom_smooth(method = nls_se, formula = y ~ a * x^b,
              method.args = list(start = list(a = 1, b = 1)),
              color = "navy", fill = "deepskyblue4", alpha = 0.2,
              linetype = 2, linewidth = 0.4)  
  theme_Agus_camacho(20)

enter image description here

  • Related