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

前端 未结 1 505
北恋
北恋 2021-01-23 16:26

Bonjour All,

I need help to find a solution to labeling the scatterplot in boxplot.

As you can see below, there is two data, first is the data of all macrocosmes

相关标签:
1条回答
  • 2021-01-23 16:53

    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)
    
    0 讨论(0)
提交回复
热议问题