Using a similar general approach in a previous question (Y axis to show counts with geom_density and geom_histogram combined in ggplot) to building a faceted histogram plot, I am trying to add some text that aligns just to the right of the centered line at xintercept=50, with an arrow pointing to the right.
The current code I have below uses annotate() in a way that mostly satisfactorily accomplishes this, but with one big caveat–I would ideally want to have the text and arrow only show up in one facet (the top left facet, if able to choose).
From my research thus far, it’s not clear to me that this is accomplishable with annotate(), but I thought I’d see if anyone has ideas. There are a couple of answers on this question (Annotating text on individual facet in ggplot2), though they are a decade old and use geom_text() instead. Can this be done with annotate() in my current code structure?
Using a similar general approach in a previous question (Y axis to show counts with geom_density and geom_histogram combined in ggplot) to building a faceted histogram plot, I am trying to add some text that aligns just to the right of the centered line at xintercept=50, with an arrow pointing to the right.
The current code I have below uses annotate() in a way that mostly satisfactorily accomplishes this, but with one big caveat–I would ideally want to have the text and arrow only show up in one facet (the top left facet, if able to choose).
From my research thus far, it’s not clear to me that this is accomplishable with annotate(), but I thought I’d see if anyone has ideas. There are a couple of answers on this question (Annotating text on individual facet in ggplot2), though they are a decade old and use geom_text() instead. Can this be done with annotate() in my current code structure?
Using a similar general approach in a previous question (Y axis to show counts with geom_density and geom_histogram combined in ggplot) to building a faceted histogram plot, I am trying to add some text that aligns just to the right of the centered line at xintercept=50, with an arrow pointing to the right.
The current code I have below uses annotate() in a way that mostly satisfactorily accomplishes this, but with one big caveat–I would ideally want to have the text and arrow only show up in one facet (the top left facet, if able to choose).
From my research thus far, it’s not clear to me that this is accomplishable with annotate(), but I thought I’d see if anyone has ideas. There are a couple of answers on this question (Annotating text on individual facet in ggplot2), though they are a decade old and use geom_text() instead. Can this be done with annotate() in my current code structure?