add absolute values to datapoints with ggplot

Dear community

Can pls somebody help me. I did a ggplot with six observations (see below).

Now my question is. How can I add the real effect value to each of the datapoints?

My Code:
ggplot(data_finaly, aes(x = row_num, y = effect)) +
geom_line(aes(y = effect, color='effect'),size=1.25, data = data_finaly, color='gold') +
geom_point(aes(y = sig), shape = 19, size = 5, data = data_finaly, color='gold') +
geom_errorbar(aes(ymin = cil, ymax = cih), alpha=0.3,size=1, color='black')+
theme_bw(base_size = 30) +
xlab("donut hole size") +
ylab("effect") +
labs(color='Sample')

My Data:
image

Thank you so much in advance.
rstudiolooser

1 Like

You can add the following and adjust vjust as needed.

geom_text(aes(x = row_num, y = effect, label = effect), vjust = -1)
2 Likes

Hi, what do you mean with add the real effect?

is put the text of effect in each row_num?
:thinking:

Thank you, it works.
GOAT!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.