ogawa - 10 months ago 64

R Question

How to apply geom_smooth() for every group ?

under program is use

`facet_wrap()`

so plot every group graph.

I would like to integrate the graph, and get one graph.

`ggplot(data = iris, aes(x = Sepal.Length, y = Petal.Length)) +`

geom_point(aes(color = Species)) +

geom_smooth(method = "nls", formula = y ~ a * x + b, se = F,

method.args = list(start = list(a = 0.1, b = 0.1))) +

facet_wrap(~ Species)

Answer Source