0

When using geom_pointrange the legend always displays vertical lines, even when the lines in the actual plot are horizontal. For example

ggplot(ToothGrowth, 
       aes(x = len, y = dose, xmin = len + 5, xmax = len - 5, color = supp)) +
  geom_pointrange(position = position_dodge2(width = 1))

produces enter image description here

I would like to make the lines in the legend next to "OJ" and "VC" run horizontally to match the plot.

conflictcoder
  • 383
  • 1
  • 9
  • 2
    Does this answer your question? [How to rotate legend symbols in ggplot2?](https://stackoverflow.com/questions/40229263/how-to-rotate-legend-symbols-in-ggplot2) – Vishal A. Dec 23 '21 at 06:10
  • Does [this](https://stackoverflow.com/questions/40229263/how-to-rotate-legend-symbols-in-ggplot2) answer your question? – Vishal A. Dec 23 '21 at 06:11

0 Answers0