I would like to create a box/rectangle around a single level of a category and include the axis category text and the bar itself:
As you can see in the photo, the rectangle extends beyond the grid and into the plot area to encompass the axis text. I'm hoping for something customizable so I can draw rounded corners or not, change the color, and specify where it goes.
Here's some generic code I used to produce a plot:
ggplot(mtcars, aes(x=factor(cyl)))+
geom_bar(stat="count", width=0.7, fill="steelblue")+
theme_minimal()
Hopefully, this isn't answered somewhere already!


