Re: [R] Annotate question

2020-02-19 Thread Rui Barradas
Hello, If groups are factors, pass the level you want to annotate. This works, note the 'x' value: ggplot(iris, aes(Species, Petal.Length)) + geom_boxplot() + annotate(geom = "text", x = "versicolor", y = 6, label = "16 u") Hope this helps, Rui Barradas Às 20:26 de 19/02/20, Thomas Subi

Re: [R] Annotate question

2020-02-19 Thread Stefan Schreiber
Since factor levels (groups) are coded by integers, you can use 1, 2, 3 etc. as your x values. If you want to annotate in between you can simply pick values in between 1, 2, 3, etc. On Wed, Feb 19, 2020, 13:26 Thomas Subia, wrote: > Colleagues, > > To add an annotation using ggplot, I've used >

[R] Annotate question

2020-02-19 Thread Thomas Subia
Colleagues, To add an annotation using ggplot, I've used annotate("text",x=17,y=2130,label="16 u"). However, this does not work when trying to annotate box plots by groups since groups are factors. Any advice would be appreciated. Thomas Subia ASQ CQE IMG Companies  225 Mountain Vista Parkw