Relative Content

Tag Archive for rggplot2shinyggplotly

Y axis position of labels next to vline in a ggplotly facet plot

I’m working with a ggplotly visualization that uses faceting to display data by category. Each facet has a vertical line, and I want to add a label next to it. I’d like the label’s y-position to be at 80% of the maximum value in each subplot’s data points. Additionally, it would be ideal if the labels could be rotated 90 degrees for better readability.