r语言中怎么把某个点在折线图中标出来的

Python014

r语言中怎么把某个点在折线图中标出来的,第1张

如果是加文字,画好图之后,在你想放文字的地方text(x,y,name),如楼上。

如果是要突出显示,points(x,y)吧

http://wenku.baidu.com/link?url=mMnroYY14th1qiKzsFnTUVceptBVugQsrLbYFItaqMN25xftBQlMBThtyW5fsmIgkMWcWbkXyozKR85SFEb7VwDUhekqSBVDuOvskifRo7W###

可以查看segmented包求拐点的例子。

R中运行:

library(segmented)

?segmented

。。。。。。

#An example using the default method:

# Cox regression with a segmented relationship  

## Not run:

library(survival)

data(stanford2)

o<-coxph(Surv(time, status)~age, data=stanford2)

os<-segmented(o, ~age, psi=40) #estimate the breakpoint in the age effect

summary(os) #actually it means summary.coxph(os)

plot(os) #it does not work

plot.segmented(os) #call explicitly plot.segmented() to plot the fitted piecewise lines

如图,拐点已求出