anthonyfang的个人博客分享 http://blog.sciencenet.cn/u/anthonyfang

博文

[转载]【转载】泰勒图-R

已有 3108 次阅读 2020-3-21 02:22 |系统分类:科研笔记|文章来源:转载

taylor.diagram {plotrix}

R Documentation

Taylor diagramDescription

Display a Taylor diagram.

Usage taylor.diagram(ref,model,add=FALSE,col="red",pch=19,pos.cor=TRUE,  xlab="",ylab="",main="Taylor Diagram",show.gamma=TRUE,ngamma=3,  sd.arcs=0,ref.sd=FALSE,grad.corr.lines=c(0.2,0.4,0.6,0.8,0.9),  pcex=1,normalize=FALSE,...)Arguments

refnumeric vector - the reference values.
modelnumeric vector - the predicted model values.
addwhether to draw the diagram or just add a point.
colthe color for the points displayed.
pchthe type of point to display.
pos.corwhether to display only positive (TRUE) or all values of correlation (FALSE).
xlab,ylabplot axis labels.
maintitle for the plot.
show.gammawhether to display standard deviation arcs around the reference point (only for pos.cor=TRUE).
ngammathe number of gammas to display (default=3).
sd.arcswhether to display arcs along the standard deviation axes (see Details).
ref.sdwhether to display the arc representing the reference standard deviation.
grad.corr.linesthe values for the radial lines for correlation values (see Details).
pcexcharacter expansion for the plotted points.
normalizewhether to normalize the models so that the reference has a standard deviation of 1.
...Additional arguments passed to plot.

Details

The Taylor diagram is used to display the quality of model predictions against the reference values, typically direct observations.

A diagram is built by plotting one model against the reference, then adding alternative model points. If normalize=TRUE when plotting the first model, remember to set it to TRUE when plotting additional models.

Two displays are available. One displays the entire range of correlations from -1 to 1. Setting pos.cor to FALSE will produce this display. The -1 to 1 display includes a radial grid for the correlation values. When pos.cor is set to TRUE, only the range from 0 to 1 will be displayed. The gamma lines and the arc at the reference standard deviation are optional in this display.

Both the standard deviation arcs and the gamma lines are optional in the pos.cor=TRUE version. Setting sd.arcs or grad.corr.lines to zero or FALSE will cause them not to be displayed. If more than one value is passed for sd.arcs, the function will try to use the values passed, otherwise it will call prettyto calculate the values.

Value

The values of par that preceded the function. This allows the user to add points to the diagram, then restore the original values. This is only necessary when using the 0 to 1 correlation range.

Author(s)

Olivier Eterradossi with modifications by Jim Lemon

References

Taylor, K.E. (2001) Summarizing multiple aspects of model performance in a single diagram. Journal of Geophysical Research, 106: 7183-7192.

  1. Examples

  2. # fake some reference data

  3. ref<-rnorm(30,sd=2)

  4. # add a little noise

  5. model1<-ref+rnorm(30)/2

  6. # add more noise

  7. model2<-ref+rnorm(30)

  8. # display the diagram with the better model

  9. oldpar<-taylor.diagram(ref,model1)

  10. # now add the worse model

  11. taylor.diagram(ref,model2,add=TRUE,col="blue")

  12. # get approximate legend position

  13. lpos<-1.5*sd(ref)

  14. # add a legend

  15. legend(lpos,lpos,legend=c("Better","Worse"),pch=19,col=c("red","blue"))

  16. # now restore par values

  17. par(oldpar)

  18. # show the "all correlation" display

  19. taylor.diagram(ref,model1,pos.cor=FALSE)

  20. taylor.diagram(ref,model2,add=TRUE,col="blue")

复制代码



[Package plotrix version 2.6-1




https://blog.sciencenet.cn/blog-3321945-1224518.html

上一篇:[转载]生态学习笔札 GPP、NPP、NEP及NBP概念辨析
下一篇:[转载][R语言绘图]绘图样式设置(符号、线条、颜色、文本属性)
收藏 IP: 39.149.25.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-20 04:08

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部