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
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
>
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
Just replace the fixed y coordinate values in the text() calls with something
that will change appropriately with the number of studies/effects included in
the plot. For example:
text(c(-9.5,-8,-6,-4.5), res$k+2, c("TB+", "TB-", "TB+", "TB-"))
text(c(-8.75,-5.25), res$k+3, c("Vaccinated", "C
See rug() and use col=2 to get red. So, as an example ...
x <- rchisq(100, df=2)
hist(x)
abline(v=median(x), lty=2)
rug(x, col=2)
TF
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Wendy
Sent: Tuesday, November 01, 2011 10:22 AM
T
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
11 matches
Mail list logo