2
我想着色曲線的包絡。 說,例如:如何爲曲線包絡着色
set.seed(1)
middle = seq(1,10,length.out=100)
upper = middle+5*runif(100)
lower = middle-5*runif(100)
plot(seq(100),middle,ylim=range(lower,middle,upper),type='l',col='red')
lines(upper,col='grey')
lines(lower,col='grey')
我怎樣才能在灰色灰色線之間?
使用'polygon',像'多邊形(C(xvals,REV(xvals描述)) ,c(min_y,max_y))'......我覺得必須有一個重複的地方,但不能很快找到它。 –
是的,它在'demo(graphics)'中有描述。 – RHertel
@RHertel,好點(你可以複製這些信息作爲答案,如果你喜歡的話),但我的意思是特別是一個StackOverflow重複... –