Hi
You could use the 'gggrid' package, which gets you access to other
coordinate systems. For example, the following places the text labels
2mm above the (centres of the) data points (bottom-justified) ...
library(gggrid)
labels <- function(data, coords) {
textGrob(data$label,
Às 20:34 de 04/10/2023, Subia Thomas OI-US-LIV5 escreveu:
Colleagues,
I wish to create y-data labels which meet a criterion.
Here is my reproducible code.
library(dplyr)
library(ggplot2)
library(cowplot)
above_92 <- filter(faithful,waiting>92)
ggplot(faithful,aes(x=eruptions,y=waiting))+
g
Another approach (still seems to require experimentation to get the value
'2') would be to replace the annotate() with
geom_text(data=above_92, aes(x=eruptions,y=waiting, label=waiting),
nudge_y=2)
At least this makes clear the reason for the magic number '2' in the code.
For details see
?geom_t
Colleagues,
I wish to create y-data labels which meet a criterion.
Here is my reproducible code.
library(dplyr)
library(ggplot2)
library(cowplot)
above_92 <- filter(faithful,waiting>92)
ggplot(faithful,aes(x=eruptions,y=waiting))+
geom_point(shape=21,size=3,fill="orange")+
theme_cowplot()+
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
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
>
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
On Oct 2, 2012, at 3:38 PM, Ben Harrison wrote:
> On 28 September 2012 16:38, David Winsemius wrote:
>>
>> ?text # should be fairly clear.
>
> Thank you. I was stupid to ask such a trivial question along with a
> not-so-trivial one. The second part of the question was probably more
> importan
On 28 September 2012 16:38, David Winsemius wrote:
>
> ?text # should be fairly clear.
Thank you. I was stupid to ask such a trivial question along with a
not-so-trivial one. The second part of the question was probably more
important: is there a way to obtain the location of segments produced
b
On Sep 27, 2012, at 9:07 PM, Ben Harrison wrote:
> Hello,
>
> I have produced some segmented regressions with the segmented package by
> Viggo Mutteo. I have some example data and code below. I want to annotate
> the individual segments with the slope parameter (actually it would be
> nicer to a
Hello,
I have produced some segmented regressions with the segmented package by
Viggo Mutteo. I have some example data and code below. I want to annotate
the individual segments with the slope parameter (actually it would be
nicer to annotate with 1000*slope and add some small amount of text as
we
Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Jokel Meyer
> Sent: Tuesday, July 24, 2012 16:16
> To: r-help@r-project.org
> Subject: [R] Annotate forest plot 'forest.rma()' for meta-analysis with
> metafor packa
Dear R-experts,
The forest.rma() function from the metafor package creates nice forest
plots for presenting the results of a meta-analysis. These plots can be
annotated for e.g. giving names to the columns. E.g. as in the
documentation of the package:
data(dat.bcg)
### meta-analysis of the log r
AM
To: r-help@r-project.org
Subject: [R] annotate histogram
Hi all,
I want to make a histogram like the one show
http://nar.oxfordjournals.org/content/39/suppl_1/D1011/F1.expansion.html
here , but I did not figure out how to add the red marks at the bottom of the
bars. Could anybody help? Thank
Hi,
You can use function segments() to draw them.
Regards,
Carlos Ortega
www.qualityexcellence.es
2011/11/1 Wendy
> Hi all,
>
> I want to make a histogram like the one show
> http://nar.oxfordjournals.org/content/39/suppl_1/D1011/F1.expansion.html
> here , but I did not figure out how to add
Hi all,
I want to make a histogram like the one show
http://nar.oxfordjournals.org/content/39/suppl_1/D1011/F1.expansion.html
here , but I did not figure out how to add the red marks at the bottom of
the bars. Could anybody help? Thank you very much
--
View this message in context:
http://r.789
16 matches
Mail list logo