New to R coding, new to coding in general

It is going to require use of geom_text(). Maybe something like:

ggplot(
    data = data08_n
    )+
geom_col(
    mapping = aes(
        x = country, 
        y = percentage # a new variable you need to calculate before calling ggplot
        fill = job_satisfaction
        ),
        position = "fill"
    )+
geom_text(
    position = position_fill(vjust = 0.5),
    mapping = aes(label = percent(percentage)) # not sure about this, exactly
  ) +
  scale_y_continuous(scales::labels = percent)

If you want more specific advice, then prepare a reproducible example.

3 Likes