Labeling the scatterplot point in boxplot And the summary of the boxplot in the graph in R

流过昼夜 提交于 2019-12-02 05:58:21

The text function should work find. For example,

R> x = rnorm(10)
R> boxplot(x, ylim=c(-3, 3))
R> text(1, 1, "Hi", col=2)

In your example, try something like:

text(1, means, LETTERS[length(means)], col=2)

This should display letters at the red dots. However, in your call to the strip chart function, you have "jittered" or "wiggled" the points. Since you've only a few points, don't jitter them (probably omit the method argument), and the following should work:

text(1.3, means, LETTERS[length(means)], col=2)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!