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") +

My Data:

Thank you so much in advance.

1 Like

You can add the following and adjust vjust as needed.

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

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

is put the text of effect in each row_num?

Thank you, it works.

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.