1
我不知道如何在ggplot2中的curve()函數中複製add = TRUE參數?在ggplot2中覆蓋很多曲線
假設我有這樣的情節
testfn<-function(x,a){
sin(x-a)
}
for(i in 1:10){
curve(testfn(x,i),add=TRUE,xlim=c(-5,5))
}
如何在GGPLOT2做到這一點,而無需手動添加10 + stat_function()秒?
感謝