1

Does anyone have a solution to this graph? The labels above the bar graph are cutoff either at the top or at the bottom, depending on how I do the vertical adjustment. I don't think I can reduce the size of the font enough to fit and be readable.

On the one hand, I have this, where the label is cut off in the first bar for Paid Search

enter image description here

ggplot(all_rb6, aes(x = `Number of Touchpoints`, y = Percent, fill = Campaign)) +
  geom_col(position = 'dodge') +
  facet_wrap(~Campaign) +
    labs(title="Title", subtitle = "subtitle") +
  theme(plot.title = element_text(hjust = 0.5, face = "bold")) +
  theme(plot.subtitle = element_text(hjust = 0.5)) +
  labs(caption = "Marketing") +
  geom_text(aes(label = paste(format(Percent), "%")), vjust = -0.5, position = position_dodge(.9), colour = "black") +
  scale_fill_brewer(palette = "Pastel1")

On the other hand, I have this graph, where the labels are cut off for the third bar in all of them.

strong text

ggplot(all_rb6, aes(x = `Number of Touchpoints`, y = Percent, fill = Campaign)) +
  geom_col(position = 'dodge') +
  facet_wrap(~Campaign) +
    labs(title="Title", subtitle = "subtitle") +
  theme(plot.title = element_text(hjust = 0.5, face = "bold")) +
  theme(plot.subtitle = element_text(hjust = 0.5)) +
  labs(caption = "Marketing") +
  geom_text(aes(label = paste(format(Percent), "%")), vjust = 1.5, position = position_dodge(.9), colour = "black") +
  scale_fill_brewer(palette = "Pastel1")
hachiko
  • 671
  • 7
  • 20

0 Answers0